Only call SSL_shutdown if we have an SSL context.

This would otherwise cause trouble for listening sockets.
This commit is contained in:
Jonathan Schleifer 2011-10-22 18:33:04 +02:00
parent af7fcc1aa4
commit d8b6916fe9

View file

@ -182,7 +182,8 @@ static SSL_CTX *ctx;
- (void)close - (void)close
{ {
SSL_shutdown(ssl); if (ssl != NULL)
SSL_shutdown(ssl);
[super close]; [super close];
} }