Fix mosquitto_want_write for TLS sock connecting
Copied logic from mosquitto_loop which was already patched by
39ffd6fa
.
Bugs: #648
This commit is contained in:
parent
c86b38cab6
commit
254f30cdb1
@ -1202,15 +1202,20 @@ int mosquitto_loop_write(struct mosquitto *mosq, int max_packets)
|
||||
|
||||
bool mosquitto_want_write(struct mosquitto *mosq)
|
||||
{
|
||||
bool result = false;
|
||||
if(mosq->out_packet || mosq->current_out_packet){
|
||||
return true;
|
||||
#ifdef WITH_TLS
|
||||
}else if(mosq->ssl && mosq->want_write){
|
||||
return true;
|
||||
#endif
|
||||
}else{
|
||||
return false;
|
||||
result = true;
|
||||
}
|
||||
#ifdef WITH_TLS
|
||||
if(mosq->ssl){
|
||||
if (mosq->want_write) {
|
||||
result = true;
|
||||
}else if(mosq->want_connect){
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
int mosquitto_opts_set(struct mosquitto *mosq, enum mosq_opt_t option, void *value)
|
||||
|
Loading…
Reference in New Issue
Block a user