fixes another effect inference bug [backport:1.6] (#19100)
* fixes another effect inference bug [backport:1.6]
This commit is contained in:
parent
f2f15e9726
commit
fce89cb60a
7 changed files with 85 additions and 11 deletions
|
|
@ -733,7 +733,7 @@ when defined(windows) or defined(nimdoc):
|
|||
|
||||
proc acceptAddr*(socket: AsyncFD, flags = {SocketFlag.SafeDisconn},
|
||||
inheritable = defined(nimInheritHandles)):
|
||||
owned(Future[tuple[address: string, client: AsyncFD]]) =
|
||||
owned(Future[tuple[address: string, client: AsyncFD]]) {.gcsafe.} =
|
||||
## Accepts a new connection. Returns a future containing the client socket
|
||||
## corresponding to that connection and the remote address of the client.
|
||||
## The future will complete when the connection is successfully accepted.
|
||||
|
|
@ -800,7 +800,7 @@ when defined(windows) or defined(nimdoc):
|
|||
|
||||
var ol = newCustom()
|
||||
ol.data = CompletionData(fd: socket, cb:
|
||||
proc (fd: AsyncFD, bytesCount: DWORD, errcode: OSErrorCode) =
|
||||
proc (fd: AsyncFD, bytesCount: DWORD, errcode: OSErrorCode) {.gcsafe.} =
|
||||
if not retFuture.finished:
|
||||
if errcode == OSErrorCode(-1):
|
||||
completeAccept()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue