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

fix: deadlock when resetting connection #798

Merged
merged 5 commits into from
Dec 8, 2021
Merged

Conversation

acomley-stripe
Copy link
Contributor

@acomley-stripe acomley-stripe commented Dec 7, 2021

Reviewers

r? @pepin-stripe
cc @stripe/developer-products

Summary

When the timer triggers to reset the connection, a deadlock can occur if the ping write fails during that period.

pkg/websocket/client.go Show resolved Hide resolved
pkg/websocket/client.go Outdated Show resolved Hide resolved
@acomley-stripe acomley-stripe marked this pull request as ready for review December 8, 2021 17:39
case <-c.stopWritePump:
c.cfg.Log.WithFields(log.Fields{
"prefix": "websocket.Client.writePump",
}).Debug("Failed to send ping; connection is resetting")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love those!

@acomley-stripe acomley-stripe merged commit b424ed8 into master Dec 8, 2021
@tomer-stripe tomer-stripe deleted the acomley/DX-6621 branch September 6, 2022 16:38
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

3 participants