diff options
author | Bruce Doan <rgv151@gmail.com> | 2015-07-31 01:24:35 +0700 |
---|---|---|
committer | Bruce Doan <rgv151@gmail.com> | 2015-07-31 01:24:35 +0700 |
commit | 55ef708e737deb6553fd241f7f0283d489d553a1 (patch) | |
tree | cc5a0eadfb9e4194be76632b419ce0e3e5dabadb /lib | |
parent | 8913e82f4505cb542c06545696ef687a52cd080c (diff) | |
download | Nim-55ef708e737deb6553fd241f7f0283d489d553a1.tar.gz |
Free SSL handler to avoid memory leaks
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/asyncnet.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim index cfd3d7666..9139200f3 100644 --- a/lib/pure/asyncnet.nim +++ b/lib/pure/asyncnet.nim @@ -453,6 +453,7 @@ proc close*(socket: AsyncSocket) = when defined(ssl): if socket.isSSL: let res = SslShutdown(socket.sslHandle) + SSLFree(socket.sslHandle) if res == 0: discard elif res != 1: @@ -567,4 +568,3 @@ when not defined(testing) and isMainModule: var f = accept(sock) f.callback = onAccept runForever() - |