mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 09:54:49 +00:00
Async SSL socket SIGSEGV's sometimes when calling socket.close() while send/recv. The issue was found here https://github.com/nitely/nim-hyperx/pull/59. Possibly related: #24024 This can occur when closing the socket while sending or receiving, because `socket.sslHandle` is freed. The sigsegv can also occur on calls that require `socket.bioIn` or `socket.bioOut` because those use `socket.sslHandle` internally. This PR checks sslHandle is set before doing any operation that requires it.