novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 463 forks source link

Reconnect appears to be incorrect. #555

Open albe1066 opened 4 years ago

albe1066 commented 4 years ago

Short description

Reconnect does not appear to work correctly. Client attempts reconnects forever.

Environment

Steps to reproduce

1 - Connect iOS mqtt client to server - successful connect 2 - Change mqtt user name (or certs) on server reload config using -SIGHUP 3 - Client connection fails and reconnects begin. Reconnects continue forever.

Expected behaviour

Expected client to stop reconnects after maxretryInterval.

From debugger -- These values do not change - client attempts to reconnect forever. _maxRetryInterval NSTimeInterval 5 _retryInterval NSTimeInterval 1 _currentRetryInterval NSTimeInterval 8 _maxRetryInterval NSTimeInterval 5

Actual behaviour

Expected reconnects to stop when maxRetryInteval is reached or at some point reconnects stop. We have a iOS client that has been attempting reconnects for weeks. We thought this was malicious behavior until we began looking into connection attempts. This is MQTT-Client-Framework attempting to reconnect forever.