summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorLeorize <leorize+oss@disroot.org>2020-06-01 20:32:42 -0500
committerAndreas Rumpf <rumpf_a@web.de>2020-06-06 21:11:53 +0200
commitd06e6eec79c68f8e9bf87c89fc770ca7722c4728 (patch)
tree8cc83cc1829fb137c9d40d5271e16681e1153a2f
parent65b350f11246654f2b04a9a606a731ba0b9a72c5 (diff)
downloadNim-d06e6eec79c68f8e9bf87c89fc770ca7722c4728.tar.gz
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.
-rw-r--r--lib/pure/net.nim1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index f7aacfb0c..d807a5112 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