Hi 0x50f13. First of all, thank you for implementing the websocket functionality! I found a few sittuation when the application will either run into errors, show wrong status messages or even fail to reconnect until the app is started again or a user setting is changed. I also implemented a fix and will create a pull request. I would be happy to get suggestions from you if this fix goes along with your implementation of the websocket.
Scenario 1: When websocket is enabled and any of the settings is changed, the application will run into the exception "Can not get websocket URL". Dispite the exception, the application will successfully reconnect seconds later.
Scenario 2: When the websocket is enabled, then all connections are disabled and then a preference in the app is changed, the app will log the same exception as in scenario 1 but also show a wrong status suggesting that the login credentials might be wrong or the notify push service is not installed.
Scenario 3: Create Scenario 2, but then re-enable the connection. The app will stay disconnected with the same status message until restarted or any preference in the app is changed.
Hi 0x50f13. First of all, thank you for implementing the websocket functionality! I found a few sittuation when the application will either run into errors, show wrong status messages or even fail to reconnect until the app is started again or a user setting is changed. I also implemented a fix and will create a pull request. I would be happy to get suggestions from you if this fix goes along with your implementation of the websocket.
Scenario 1: When websocket is enabled and any of the settings is changed, the application will run into the exception "Can not get websocket URL". Dispite the exception, the application will successfully reconnect seconds later.
Scenario 2: When the websocket is enabled, then all connections are disabled and then a preference in the app is changed, the app will log the same exception as in scenario 1 but also show a wrong status suggesting that the login credentials might be wrong or the notify push service is not installed.
Scenario 3: Create Scenario 2, but then re-enable the connection. The app will stay disconnected with the same status message until restarted or any preference in the app is changed.