From bb949a75db490c9bccae975855310ee2de0b4b28 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 27 Jul 2019 17:47:46 +0100 Subject: 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`. --- lib/pure/asyncnet.nim | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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") -- cgit 1.4.1-2-gfad0