Set minimum keepalive argument to `mosquitto_connect*()` to be 5 seconds.

Closes #1550. Thanks to Markus Gothe.
pull/1586/head
Roger A. Light 6 years ago
parent 9ae38788dc
commit 8f1c8cba59

@ -9,6 +9,10 @@ Broker:
listening socket, by calling freeaddrinfo. Closes #1565.
- Fix config->user not being freed on exit. Closes #1564.
Library:
- Set minimum keepalive argument to `mosquitto_connect*()` to be 5 seconds.
Closes #1550.
1.6.8 - 20191128
================

@ -43,6 +43,7 @@ static int mosquitto__connect_init(struct mosquitto *mosq, const char *host, int
if(!mosq) return MOSQ_ERR_INVAL;
if(!host || port <= 0) return MOSQ_ERR_INVAL;
if(keepalive < 5) return MOSQ_ERR_INVAL;
if(mosq->id == NULL && (mosq->protocol == mosq_p_mqtt31 || mosq->protocol == mosq_p_mqtt311)){
mosq->id = (char *)mosquitto__calloc(24, sizeof(char));

Loading…
Cancel
Save