You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today i want to test password is wrong this case and find that client always try to reconnect.
In read_handle_client.c
switch(result){
case 0:
mosq->state = mosq_cs_connected;
return MOSQ_ERR_SUCCESS;
case 1:
case 2:
case 3:
case 4:
case 5:
return MOSQ_ERR_CONN_REFUSED;
default:
return MOSQ_ERR_PROTOCOL;
}
If result is non-zero we don't modify mosq->state. In mosquitto_loop_forever mosquitto will call mosquitto_reconnect many a time to reconnect.
Should we modify mosq->state if CONNECT fail?
The text was updated successfully, but these errors were encountered:
In Last version mosquitto_loop_forever will check mosquitto_loop return value. The loop will quit if error is fatal. But MOSQ_ERR_CONN_REFUSED is not deemed to a fatal error, loop will continue and reconnect again.
What i want to ask is should client stop reconnect server and quit loop if CONNECT fail.
Today i want to test password is wrong this case and find that client always try to reconnect.
In
read_handle_client.c
If result is non-zero we don't modify
mosq->state
. Inmosquitto_loop_forever
mosquitto will callmosquitto_reconnect
many a time to reconnect.Should we modify
mosq->state
if CONNECT fail?The text was updated successfully, but these errors were encountered: