You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I noticed that reconnect back-off mechanism configured via mosquitto_reconnect_delay_set() does not work as stated in documentation.
According to documentation for: delay=3, delay_max=30, exponential_backoff=True
Delays would be: 3, 6, 12, 24, 30, 30, ...
But the tested behavior is different and for: delay=3, delay_max=30, exponential_backoff=True
Delays are: 3, 12, 27, 30, 30, ...
I noticed that the following formula is used for back-off calculation:
if(mosq->reconnect_exponential_backoff){
reconnect_delay = mosq->reconnect_delay*(mosq->reconnects+1)(mosq->reconnects+1);
}else{
reconnect_delay = mosq->reconnect_delay(mosq->reconnects+1);
}
Shouldn't the formula for the case when exponential_backoff=True look like that:
reconnect_delay = mosq->reconnect_delay*2^(mosq->reconnects-1)
I use mosquitto-1.6.7 but it seems that the same formula is stated in the newest version.
The text was updated successfully, but these errors were encountered:
Hello,
I noticed that reconnect back-off mechanism configured via mosquitto_reconnect_delay_set() does not work as stated in documentation.
According to documentation for: delay=3, delay_max=30, exponential_backoff=True
Delays would be: 3, 6, 12, 24, 30, 30, ...
But the tested behavior is different and for: delay=3, delay_max=30, exponential_backoff=True
Delays are: 3, 12, 27, 30, 30, ...
I noticed that the following formula is used for back-off calculation:
if(mosq->reconnect_exponential_backoff){
reconnect_delay = mosq->reconnect_delay*(mosq->reconnects+1)(mosq->reconnects+1);
}else{
reconnect_delay = mosq->reconnect_delay(mosq->reconnects+1);
}
Shouldn't the formula for the case when exponential_backoff=True look like that:
reconnect_delay = mosq->reconnect_delay*2^(mosq->reconnects-1)
I use mosquitto-1.6.7 but it seems that the same formula is stated in the newest version.
The text was updated successfully, but these errors were encountered: