diff --git a/lib/packet_mosq.c b/lib/packet_mosq.c index 5cf78fa9..727ddf63 100644 --- a/lib/packet_mosq.c +++ b/lib/packet_mosq.c @@ -254,6 +254,10 @@ int packet__write(struct mosquitto *mosq) || errno == WSAENOTCONN #endif ){ + /* Make sure the rest of the data is written later. + */ + if (packet->to_process>0) + mosq->want_write=true; pthread_mutex_unlock(&mosq->current_out_packet_mutex); return MOSQ_ERR_SUCCESS; }else{