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 sending task keepalive ping after stream is closed #6514

Merged
merged 1 commit into from May 17, 2024

Conversation

bduffany
Copy link
Member

@bduffany bduffany commented May 7, 2024

This is a follow-up from #6507 which was closed.

There was no race condition in that original PR because we were holding a mutex before sending anything on the stream. However, there is a separate issue where pingServer could potentially try to send a message on the stream after Close() was called. In practice, this likely just adds noise to logs, but I figured it would be nice to fix.

Also fix a small bug that the short-circuiting check in Close() was not actually short-circuiting, though in practice we never actually hit this codepath because we only Close once.

Related issues: N/A

Copy link
Member

@tylerwilliams tylerwilliams left a comment

Choose a reason for hiding this comment

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

LGTM, Approval

@bduffany bduffany merged commit b1704b8 into master May 17, 2024
18 of 19 checks passed
@bduffany bduffany deleted the task-leaser-check-closed branch May 17, 2024 13:21
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