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

server: fix leaked net.Conn #4642

Merged
merged 1 commit into from Aug 3, 2021
Merged

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Aug 3, 2021

This happens when NewServerTransport() returns nil, nil. The rawConn is
closed when the transport is closed, which will never happen in this
case (since the returned transport is nil).

This is a backport of #4633

RELEASE NOTES:

  • server: fix bug that net.Conn is leaked if the connection is closed (io.EOF) immediately with no traffic

This happens when NewServerTransport() returns nil, nil. The rawConn is
closed when the transport is closed, which will never happen in this
case (since the returned transport is nil).
@menghanl menghanl requested a review from dfawley Aug 3, 2021
@menghanl menghanl added this to the 1.39 Release milestone Aug 3, 2021
dfawley
dfawley approved these changes Aug 3, 2021
@dfawley dfawley assigned menghanl and unassigned dfawley Aug 3, 2021
@menghanl menghanl merged commit 8d1369b into grpc:v1.39.x Aug 3, 2021
12 checks passed
@menghanl menghanl deleted the v1.39.x_conn_leak branch Aug 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants