Don't keep trying to connect in sub client if CONNACK negative.

This commit is contained in:
Roger A. Light 2018-03-15 11:13:17 +00:00
parent a571104809
commit 611ad222bb
2 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,8 @@ Clients:
- Connections now default to using MQTT v3.1.1.
- Default to using port 8883 when using TLS.
- Correctly handle empty files with "mosquitto_pub -l". Closes #676.
- mosquitto_sub doesn't continue to keep connecting if CONNACK tells it the
connection was refused.
Build:
- Add WITH_STRIP option (defaulting to "no") that when set to "yes" will strip

View File

@ -367,6 +367,7 @@ void my_connect_callback(struct mosquitto *mosq, void *obj, int result)
if(result && !cfg->quiet){
fprintf(stderr, "%s\n", mosquitto_connack_string(result));
}
mosquitto_disconnect(mosq);
}
}