Skip to content

Fall back to offline authorization immediately when WebSocket unconnected#282

Merged
matth-x merged 4 commits intomainfrom
feature/direct-offline-mode
Apr 19, 2024
Merged

Fall back to offline authorization immediately when WebSocket unconnected#282
matth-x merged 4 commits intomainfrom
feature/direct-offline-mode

Conversation

@matth-x
Copy link
Owner

@matth-x matth-x commented Apr 19, 2024

Check the connectivity status of the WebSocket before sending an Authorize request to find out if the charger is offline.

Previously, MO always tried to send the Authorize request and entered the offline mode when Authorize timed out (after 20 seconds by default).

To implement this, the Connection allows checking if it's offline via isConnected(). Furthermore, the transaction logic needs access to the Connection instance.

@matth-x matth-x marked this pull request as ready for review April 19, 2024 15:05
@matth-x matth-x merged commit 6812137 into main Apr 19, 2024
@matth-x matth-x deleted the feature/direct-offline-mode branch April 19, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant