Skip to content

Commit

Permalink
Fixes subtle SSL recvInto bug.
Browse files Browse the repository at this point in the history
This resulted in a "value out of range: -1" exception inside `recvInto`
(on the `copyMem` line). Basically readIntoBuf was returning `-1`.
  • Loading branch information
dom96 committed Jul 27, 2019
1 parent ceb1a1b commit bb949a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/pure/asyncnet.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit bb949a7

Please sign in to comment.