Skip to content
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

Avoid asynchronous callback on ReconnectableConnection, too. #244

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

mattgallagher
Copy link
Contributor

This PR is a follow up to #238

After fixing that bug, we're now seeing a deadlock in our analytics in ReconnectableConnection. For exactly the same reasons as HttpConnection, an asynchronous callback from ReconnectableConnection can cause a deadlock with the keepAlivePing so the sendDidComplete should always be sent asynchronously.

@moozzyk moozzyk merged commit 4e776a9 into moozzyk:master Jul 19, 2022
@moozzyk
Copy link
Owner

moozzyk commented Jul 19, 2022

Thanks!

moozzyk added a commit that referenced this pull request Jan 4, 2023
This refactoring f4558f6 effectively removed the fix
introduced in #244 and the client
started deadlocking if a keep alive was sent during reconnects. To avoid
deadlocks the callback will be now scheduled asynchronously on the callback queue if
there is an error due to a reconnect. For all other cases ReconnectableConnection will
rely on the fact that the underling HttpConnection already schedules callbacks to be
executed asynchronously.

Fixes: #264
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.

None yet

2 participants