All clients now time out if they exceed their keepalive*1.5

This was inconsistent before.

Partially addresses #865.
This commit is contained in:
Roger A. Light 2018-08-02 13:05:36 +01:00
parent b07e0c08bf
commit fc9a0db966
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ Broker:
where only the loopback interface is defined. Closes #869, Closes #901.
- Fix IPv6 addresses not being able to be used as bridge addresses.
Closes #886.
- All clients now time out if they exceed their keepalive*1.5, rather than
just reach it. This was inconsistent in two places.
1.5 - 20180502

View File

@ -243,7 +243,7 @@ int mosquitto_main_loop(struct mosquitto_db *db, mosq_sock_t *listensock, int li
/* Local bridges never time out in this fashion. */
if(!(context->keepalive)
|| context->bridge
|| now - context->last_msg_in < (time_t)(context->keepalive)*3/2){
|| now - context->last_msg_in <= (time_t)(context->keepalive)*3/2){
if(db__message_write(db, context) == MOSQ_ERR_SUCCESS){
#ifdef WITH_EPOLL