Skip to content

resolve goroutine leak in serveOnPipe - #359

Open
IbrahimAhmed8 wants to merge 1 commit into
google:mainfrom
IbrahimAhmed8:fix_mesh_leak
Open

resolve goroutine leak in serveOnPipe#359
IbrahimAhmed8 wants to merge 1 commit into
google:mainfrom
IbrahimAhmed8:fix_mesh_leak

Conversation

@IbrahimAhmed8

Copy link
Copy Markdown
Contributor

Resolves #358

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a goroutine leak in serveOnPipe by ensuring that the singleConnListener is closed when the underlying connection is closed, which unblocks http.Server.Serve from Accept. A new test TestSingleConnListenerServeExitsOnConnClose is added to verify this behavior. The reviewer suggested simplifying closeNotifyConn by removing the redundant sync.Once synchronization, as the listener's Close method already handles one-time execution.

Comment thread internal/sambox/mesh.go
@IbrahimAhmed8
IbrahimAhmed8 force-pushed the fix_mesh_leak branch 4 times, most recently from 1898b7a to 04a6658 Compare September 5, 2026 18:54
Comment thread .github/workflows/test_flutter.yaml Outdated
Comment on lines +61 to +74
cache: true
- name: Set up JDK
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change seems unrelated, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll revert that as it was included by mistake during local testing,
apologize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goroutine leak in serveOnPipe blocks http.Server.Serve on Accept indefinitely

2 participants