eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.93k stars 2.37k forks source link

mosquitto_publish_v5() can return MOSQ_ERR_ERRNO, contradicting the API documentation #2704

Open rswindell opened 1 year ago

rswindell commented 1 year ago

Using mosquitto.dll 2.0.15 for Windows.

When the client disconnects from the broker (and never reconnects, a different problem), subsquent calls to mosquitto_publish_v5() (and I'm guessing also mosquitto_publish()) will return MOSQ_ERR_ERRNO with an errno value of 11, EAGAIN.

However, the API documentation for mosquitto_publish_v5() does not list MOSQ_ERR_ERRNO as a possible return value.

rswindell commented 1 year ago

The root-cause of these errors appears to be the use of a multi-threaded client (my own) with mosquitto.dll 2.0.15 which is not thread-safe.