mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-10 06:54:16 +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`.
(cherry picked from commit bb949a75db)
This commit is contained in:
committed by
narimiran
parent
86f2d0adcc
commit
58772dce2e
@@ -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