mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-07 12:24:19 +00:00
Revert "net: don't clear all errors on close"
You're supposed to clear the error queue before any I/O operations. Per
SSL_get_error(3) man page.
This reverts commit ee3ed37300.
This commit is contained in:
@@ -1006,6 +1006,7 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user