Don't call SSL_shutdown() if SSL init hasn't completed.
This commit is contained in:
parent
07c54627e9
commit
3a89059271
@ -199,7 +199,9 @@ int net__socket_close(struct mosquitto *mosq)
|
||||
#endif
|
||||
{
|
||||
if(mosq->ssl){
|
||||
SSL_shutdown(mosq->ssl);
|
||||
if(!SSL_in_init(mosq->ssl)){
|
||||
SSL_shutdown(mosq->ssl);
|
||||
}
|
||||
SSL_free(mosq->ssl);
|
||||
mosq->ssl = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user