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

Unwrap IO errors in server connection error handling #141

Merged
merged 1 commit into from
May 8, 2023

Conversation

austinvazquez
Copy link
Contributor

@austinvazquez austinvazquez commented May 1, 2023

Fixes #142

Unwrap io.EOF and io.ErrUnexpectedEOF in server connection receive error handling. When read message errors occurs, the error is wrapped to be more distinguishable from read message header errors; however, without unwrapping the errors here the result would be leaked server connections for connections where the client is now gone.

Signed-of-by: Austin Vazquez macedonv@amazon.com

@austinvazquez austinvazquez force-pushed the fix-error-check-in-server branch 2 times, most recently from 3099ec0 to 40e8044 Compare May 1, 2023 16:24
@austinvazquez austinvazquez changed the title Fix fd leak server-side after connection error. Fix server connection leak on receive message error May 1, 2023
@austinvazquez austinvazquez marked this pull request as ready for review May 1, 2023 16:31
@austinvazquez
Copy link
Contributor Author

austinvazquez commented May 1, 2023

@dmcgowan ptal related to #136

Unwrap io.EOF and io.ErrUnexpectedEOF in the case of read message error
which would lead to leaked server connections.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
@austinvazquez austinvazquez changed the title Fix server connection leak on receive message error Unwrap IO errors in server connection error handling May 2, 2023
server.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Server-side goroutine leak on receive message error
4 participants