Merge pull request #2317 from doragasu/fixes_discon_cb_on_tls_err

Call disconnect callback on TLS error.
This commit is contained in:
Roger Light
2021-10-01 17:27:39 +01:00
committed by GitHub
+5 -1
View File
@@ -373,7 +373,11 @@ int mosquitto_loop_read(struct mosquitto *mosq, int max_packets)
#ifdef WITH_TLS
if(mosq->want_connect){
return net__socket_connect_tls(mosq);
rc = net__socket_connect_tls(mosq);
if (MOSQ_ERR_TLS == rc){
rc = mosquitto__loop_rc_handle(mosq, rc);
}
return rc;
}
#endif