MQTTX
MQTTX copied to clipboard
[Bug] Auto-Reconnect does not handle configuration change
What did I do
-
Try to connect to a broker with default settings but invalid
Path
(e.g. connecting towss://broker.emqx.io:8084/mqtt_invalid_path
. -
Notice that the
Path
is wrong, open configuration and fix the path (/mqtt_invalid_path
-->/mqtt
). -
Close configuration and start a new connection with the new configuration
What happened
The client successfully connects after fixing the configuration. But I receive Alerts about Reconnecting
every couple of seconds. When looking at the Network-Tab in the Browser console it shows that it still tries to reconnect with the old invalid configuration, although i have changed them already.
The only workaround i have found so far to get rid of the background-reconnects is to refresh the page (via F5 or Ctrl+R in the Desktop Client).
Expected
When changing the configuration of a client all auto-reconnection attempts for this client should be cancelled. After I have changed the configuration the old configuration should not be used anymore.
Environment
- https://mqttx.app/web-client#/
- Chromium: Version 128.0.6613.84 (Official Build) Arch Linux (64-bit)
- MQTTX version: Version: v1.10.1
More detail
Screenshot of Proxy showing the requests that are sent out by the client. Blue marks the point in time where the configuration was fixed:
This is probably a duplicate to https://github.com/emqx/MQTTX/issues/1680 that was unfortunately closed due to inactivity.