From d06e6eec79c68f8e9bf87c89fc770ca7722c4728 Mon Sep 17 00:00:00 2001 From: Leorize Date: Mon, 1 Jun 2020 20:32:42 -0500 Subject: [PATCH] net: don't clear all errors on close Closing a socket clears the error queue of the entire thread, which seems to be a bit too invasive. Also I don't find any reason in the PR that added this. --- lib/pure/net.nim | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/pure/net.nim b/lib/pure/net.nim index f7aacfb0c3..d807a51123 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -1006,7 +1006,6 @@ proc close*(socket: Socket) = try: when defineSsl: if socket.isSsl and socket.sslHandle != nil: - ErrClearError() # Don't call SSL_shutdown if the connection has not been fully # established, see: # https://github.com/openssl/openssl/issues/710#issuecomment-253897666