diff options
author | Dominik Picheta <dominikpicheta@gmail.com> | 2019-07-27 17:47:46 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2019-07-27 19:06:56 +0100 |
commit | bb949a75db490c9bccae975855310ee2de0b4b28 (patch) | |
tree | 38909708eb160de57a2412036dc2e55b4917b56d | |
parent | ceb1a1b6884b28f3f3f88a4be5663d7f0b1f1155 (diff) | |
download | Nim-bb949a75db490c9bccae975855310ee2de0b4b28.tar.gz |
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`.
-rw-r--r-- | lib/pure/asyncnet.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim index 785f4db2d..6c3872777 100644 --- a/lib/pure/asyncnet.nim +++ b/lib/pure/asyncnet.nim @@ -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") |