Bridges now obey MQTT v5 server-keepalive.

pull/1920/head
Roger A. Light 5 years ago
parent e030ca45cd
commit ca4b23486b

@ -96,6 +96,7 @@ Broker:
- Report an error if the config file is set to a directory. Closes #1814.
- Fix bridges incorrectly setting Wills to manage remote notifications when
`notifications_local_only` was set true. Closes #1902.
- Bridges now obey MQTT v5 server-keepalive.
Client library:
- Client no longer generates random client ids for v3.1.1 clients, these are

@ -34,6 +34,7 @@ int handle__connack(struct mosquitto *context)
mosquitto_property *properties = NULL;
uint32_t maximum_packet_size;
uint8_t retain_available;
uint16_t server_keepalive;
if(!context){
return MOSQ_ERR_INVAL;
@ -77,6 +78,13 @@ int handle__connack(struct mosquitto *context)
}
}
/* server-keepalive */
if(mosquitto_property_read_int16(properties, MQTT_PROP_SERVER_KEEP_ALIVE,
&server_keepalive, false)){
context->keepalive = server_keepalive;
}
mosquitto_property_free_all(&properties);
}
mosquitto_property_free_all(&properties); /* FIXME - TEMPORARY UNTIL PROPERTIES PROCESSED */

Loading…
Cancel
Save