From d8b6916fe949535158c2da944230062a1602849a Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sat, 22 Oct 2011 18:33:04 +0200 Subject: [PATCH] Only call SSL_shutdown if we have an SSL context. This would otherwise cause trouble for listening sockets. --- src/SSLSocket.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SSLSocket.m b/src/SSLSocket.m index f86405d..4fc16c0 100644 --- a/src/SSLSocket.m +++ b/src/SSLSocket.m @@ -182,7 +182,8 @@ static SSL_CTX *ctx; - (void)close { - SSL_shutdown(ssl); + if (ssl != NULL) + SSL_shutdown(ssl); [super close]; }