mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
Fixes subtle SSL recvInto bug.
This resulted in a "value out of range: -1" exception inside `recvInto` (on the `copyMem` line). Basically readIntoBuf was returning `-1`.
This commit is contained in:
committed by
Dominik Picheta
parent
ceb1a1b688
commit
bb949a75db
@@ -257,6 +257,7 @@ when defineSsl:
|
||||
if not fut.read():
|
||||
# Socket disconnected.
|
||||
if SocketFlag.SafeDisconn in flags:
|
||||
opResult = 0.cint
|
||||
break
|
||||
else:
|
||||
raiseSSLError("Socket has been disconnected")
|
||||
|
||||
Reference in New Issue
Block a user