mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-27 02:46:29 +00:00
Make some proper closes.
This commit is contained in:
@@ -316,6 +316,7 @@ proc write*(f: AsyncFile, data: string): Future[void] =
|
||||
|
||||
proc close*(f: AsyncFile) =
|
||||
## Closes the file specified.
|
||||
unregister(f.fd)
|
||||
when defined(windows) or defined(nimdoc):
|
||||
if not closeHandle(f.fd.Handle).bool:
|
||||
raiseOSError(osLastError())
|
||||
|
||||
Reference in New Issue
Block a user