Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: agent stats websocket blocking until next interval #4609

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

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Oct 17, 2022

For httpapi.Heartbeat to work properly, a call to wsjson.Read must always be in flight, otherwise pings can't be exchanged. This caused the ping loop to hang until the next stat interval. Since the loop was blocking until the next interval it would also never exit until it fired.

@coadler coadler requested a review from kylecarbs October 17, 2022 23:35
@coadler coadler self-assigned this Oct 17, 2022
For `httpapi.Heartbeat` to work properly, a call to `wsjson.Read` must
always be in flight, otherwise pings can't be exchanged. This caused
the ping loop to hang until the next stat interval. Since the loop was
blocking until the next interval it would also never exit until it
fired.
@kylecarbs kylecarbs force-pushed the colin/fix-agent-stats branch from 0565611 to b3d8ab7 Compare October 18, 2022 00:06
@coadler coadler enabled auto-merge (squash) October 18, 2022 00:07
@coadler coadler merged commit e95239c into main Oct 18, 2022
@coadler coadler deleted the colin/fix-agent-stats branch October 18, 2022 00:15
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants