Don't clear SSL context when TLS connection is closed.

Previous behaviour would clear the external SSL_CTX provided by
MOSQ_OPT_SSL_CTX. This required the user to reset the SSL_CTX every
disconnect, and trust that they were not leaking references.

Recreating the SSL context for every connection is not necessary, and the
SSL context is freed in mosquitto_destroy, which is sufficient.

Signed-off-by: Matthias Stone <matthias@bellstone.ca>
pull/1151/head
Matthias Stone 7 years ago committed by Roger A. Light
parent e8320cbf19
commit 4325c44baf

@ -149,10 +149,6 @@ int net__socket_close(struct mosquitto *mosq)
SSL_free(mosq->ssl);
mosq->ssl = NULL;
}
if(mosq->ssl_ctx){
SSL_CTX_free(mosq->ssl_ctx);
mosq->ssl_ctx = NULL;
}
}
#endif

Loading…
Cancel
Save