fixed premature finishing of httpclient.downloadFile
This commit is contained in:
parent
1961e444c3
commit
45765601e0
2 changed files with 8 additions and 12 deletions
|
|
@ -484,7 +484,5 @@ proc writeFromStream(f: AsyncFile, fut: FutureStream[string]) {.async.} =
|
|||
else:
|
||||
break
|
||||
|
||||
proc getWriteStream*(f: AsyncFile): FutureStream[string] =
|
||||
## Returns a new stream that can be used for writing to the file.
|
||||
result = newFutureStream[string]()
|
||||
asyncCheck writeFromStream(f, result)
|
||||
proc setWriteStream*(f: AsyncFile; fut: FutureStream[string]) {.async.} =
|
||||
await writeFromStream(f, fut)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue