|Re: [mosquitto-dev] Client receives PUBREC and MQTT disconnected|
Here's what happened:_mosquitto_handle_pubrec handles the received PUBREC, then _mosquitto_message_out_update updates the message's out status, but in this function mosq->out_messages is NULL, so MOSQ_ERR_NOT_FOUND is returned, _mosquitto_loop_rc_handle handles the response code, since it's an error, finally _mosquitto_socket_close(mosq) is called.
Regards Khitai On 2015/11/12 15:08, Khitai Pang wrote:
Got rc=6 in the ondisconenct callback. Regards Khitai On 2015/11/12 14:43, Khitai Pang wrote:Hi,I am having problem with a particular MQTT client ID. When a client connects to Mosquitto using this ID, it immediately receives a PUBREC from the broker and then MQTT get disconnected:2015-11-10 20:35:21.827 mqtt-test[58102:737651] === MQTT connected===2015-11-10 20:35:22.329 mqtt-test[58102:737651] mosquitto log : Client 362f23d0-8906-11e5-99da-005056355a83 received PUBREC (Mid: 58)2015-11-10 20:35:22.454 mqtt-test[58102:737651] === MQTT disconnected=== Log on the broker side: ...testhost mosquitto: New client connected from ... as 362f23d0-8906-11e5-99da-005056355a83 (c0, k120). testhost mosquitto: Socket error on client 362f23d0-8906-11e5-99da-005056355a83, disconnecting....The broker is mosquitto 1.3.5. The client uses libmosquitto in mosquitto 1.4.4.Any help is appreciated. Regards, Khitai _______________________________________________ mosquitto-dev mailing list mosquitto-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit_______________________________________________ mosquitto-dev mailing list mosquitto-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit
Back to the top