-
Notifications
You must be signed in to change notification settings - Fork 92
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: check decode error #78
base: master
Are you sure you want to change the base?
fix: check decode error #78
Conversation
c.incomingErr = err //must set incomingErr, tell the request fail immediately | ||
close(c.incoming) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to drop the connection, we should just call c.conn.Close
and return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ignore this error. a request may send to to unstable connection, but never get a response
- got decode error and
tryReconnect
. (inflight was removed) but not success - a request send before tryReconnect success(conn not change to new one), send can success because the network was not comlete unreachable
- tryReconnect success, and change a new conn, but the request in step 2 will never get response
- client request get stuck for ever
bump |
Hey! 👋 As part of our cleanup to kick off the year, I'm reviewing all open non-draft pull requests. Could you please do one of the following for your PR? 1. Close it: If it's no longer needed. If there's no response in a week, I'll assume it's option 1 and close the PR. If you have any questions, just let me know. Thanks for your help in keeping things organized, and I appreciate your contributions! |
This is quite out of date now, the current code handles the error with a log and moves on: Lines 691 to 696 in 9a16432
Dropping the connection and returning an error is a reasonable thing to also do, but not necessary I think and also a bit difficult given that this is done in a separate goroutine now. I think this can just be closed and if @hunjixin wants to open a new PR that changes the current behaviour we can consider that separately. |
No description provided.