-
-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address null check error and prevent duplicate events on socket reconnect #1410
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Waiting on CI now
please can fix the Ci ? :) I think it is missing a simple |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1410 +/- ##
==========================================
- Coverage 64.83% 64.61% -0.23%
==========================================
Files 41 41
Lines 1732 1718 -14
==========================================
- Hits 1123 1110 -13
+ Misses 609 608 -1 ☔ View full report in Codecov by Sentry. |
Some tests are failing because of this PR (#1394), which did not have all necessary checks run for it. |
@vincenzopalazzo can you merge this please? |
Rebase the PR on top of the current master in this way we can verify that the Ci is happy, thanks |
**Fixes** - Removed unnecessary null checks(!) on SocketChannel instance in SocketClient onConnectionLost() method which cause an error when client cannot connect (zino-hofmann#1379). this prevents reconnecting when there is a working connection later.
Resolved an issue in WebSocketClient where multiple listeners were added to `waitForConnectedState` when socket reconnects after subscription been requtesed with disconnected socket, causing duplicate events to be received by subscriptions.
… before writing to cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes
onConnectionLost()
method which cause an error when client cannot connect (Null check operator used on a null value in SocketClient.onConnectionLost #1379). this prevents reconnecting when there is a working connection later.waitForConnectedState
when socket reconnects after subscription been requtesed with disconnected socket, causing duplicate events to be received by subscriptions (Subscription will receive same event in some edge case #989) (thanks to @stardarLeung).fetchMore
where results were not added to the stream whenfetchMoreOptions.updateQuery
returned null.