- Notifications
You must be signed in to change notification settings - Fork3.6k
fix: avoid incrementing readErrCount for temporary errors and reset o…#1007
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:release-1.5
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…n successful read- Do not increment readErrCount for temporary errors such as timeouts, as they do not indicate actual connection failures.- Reset readErrCount after successful read operations to reflect the true health status of the connection.- This prevents readErrCount from growing due to normal timeout logic and provides a more accurate error state.
BeatieWolfe commentedNov 11, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Although the underlying network connection may still be usable after returning an error, a The The None of the above prevents the normal use of a read deadline to detect when the peer is not sending data as expected. Edit: Because the websocket.Conn does call read on the underlying connection after a read error is encountered, the statement |
Uh oh!
There was an error while loading.Please reload this page.
Commit title
fix: avoid incrementing readErrCount for temporary errors and reset on successful read
Description
readErrCountfor temporary errors such as timeouts, as they do not indicate actual connection failures.readErrCountafter successful read operations to reflect the true health status of the connection.readErrCountfrom growing due to normal timeout logic and provides a more accurate error state.What type of PR is this? (check all applicable)
Description
This PR addresses an issue where
readErrCountwas incremented on all errors, including temporary errors such as timeouts. Since timeouts often occur as part of normal connection management, especially when read deadlines are used, counting them as errors could lead to misleading high error counts and unnecessary connection termination or misreporting.Now, only permanent errors cause
readErrCountto increase, and a successful read resets this counter, better reflecting the real stability of the connection.Related Tickets & Documents
Added/updated tests?
Run verifications and test
make verifyis passingmake testis passingChecklist (before submitting):