client websockets automatic reconnection#23
Open
danielvcorreia wants to merge 3 commits intowavecomtech:mainfrom
Open
client websockets automatic reconnection#23danielvcorreia wants to merge 3 commits intowavecomtech:mainfrom
danielvcorreia wants to merge 3 commits intowavecomtech:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds automatic WebSocket reconnection support to the Omlox Go client, including new configuration options and documentation/examples to demonstrate usage.
Changes:
- Introduce
WithReconnect(minWait, maxWait)andReconnectOptionsto configure reconnect behavior. - Add reconnect loop logic that attempts to re-dial and resubscribe after connection loss.
- Document and exemplify reconnection usage in README and Go examples.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
client_websockets.go |
Implements reconnect loop, backoff/jitter, resubscribe flow, and adjusts pending-subscription cleanup behavior. |
client_configuration.go |
Adds reconnect configuration to ClientConfiguration and exposes WithReconnect option. |
client.go |
Adds fields to track reconnect goroutine lifecycle. |
omlox_test.go |
Adds an example demonstrating WithReconnect. |
README.md |
Documents reconnection and adds a usage snippet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0c7cae8 to
213d0e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.