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 ee3ed37300743addb1344e39bc46d3cd2b89a718.
This commit is contained in:
parent
44d0b4bdfd
commit
19ccce2617
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue