mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 04:27:44 +00:00
Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
This commit is contained in:
@@ -399,13 +399,13 @@ proc bindAddr*(socket: AsyncSocket, port = Port(0), address = "") {.
|
||||
|
||||
proc close*(socket: AsyncSocket) =
|
||||
## Closes the socket.
|
||||
socket.fd.TAsyncFD.closeSocket()
|
||||
defer:
|
||||
socket.fd.TAsyncFD.closeSocket()
|
||||
when defined(ssl):
|
||||
if socket.isSSL:
|
||||
let res = SslShutdown(socket.sslHandle)
|
||||
if res == 0:
|
||||
if SslShutdown(socket.sslHandle) != 1:
|
||||
raiseSslError()
|
||||
discard
|
||||
elif res != 1:
|
||||
raiseSslError()
|
||||
socket.closed = true # TODO: Add extra debugging checks for this.
|
||||
|
||||
Reference in New Issue
Block a user