Prior to this, duplicate entries could be added to the sock hash, which caused an infinite loop. Only affects bridges with bad settings on startup, and only when compiled using WITH_ADNS=yes.
Closes#1897. Thanks to Rodolfo Ochoa.
Fixeseclipse/mosquitto#1904
If the broker rejects the connection, as opposed to the broker being
down, then there is no hope to establish a connection. This adds a
status flag so we can signal to the loop that we should just exit.
Signed-off-by: Dan White <dan.white@valpo.edu>
Fixeseclipse/mosquitto#1899
In stdin line mode, mosquitto_pub will continue running and accepting
input even if/when/after publishing fails. This condition is reached
when it first successfully establishes a connection and the server later
is unreachable.
Exiting with a non-zero exit code allows for much easier health
monitoring when used in a long-running pipe.
Signed-off-by: Dan White <dan.white@valpo.edu>
Fixeseclipse/mosquitto#1904
If the broker rejects the connection, as opposed to the broker being
down, then there is no hope to establish a connection. This adds a
status flag so we can signal to the loop that we should just exit.
Signed-off-by: Dan White <dan.white@valpo.edu>
Fixeseclipse/mosquitto#1899
In stdin line mode, mosquitto_pub will continue running and accepting
input even if/when/after publishing fails. This condition is reached
when it first successfully establishes a connection and the server later
is unreachable.
Exiting with a non-zero exit code allows for much easier health
monitoring when used in a long-running pipe.
Signed-off-by: Dan White <dan.white@valpo.edu>
This occurred when reloading a persistence file and
`per_listener_settings true` is set and the client did not set a
username.
Closes#1891. Thanks to Mikkel Nepper-Christensen.
This allows a big swath of ifdefs to be removed. It also means savings as the db var is not passed around all of the time, and makes it easier to remove the final broker call to mosquitto_time() call in packet_mosq.c. In one test this reduced the calls to mosquitto_time() from 295k to 48k.