Skip to content

fix: add accept timeout to test upstream server to prevent mirror test hang#381

Merged
kacy merged 1 commit intomainfrom
fix/mirror-test-hang
Apr 2, 2026
Merged

fix: add accept timeout to test upstream server to prevent mirror test hang#381
kacy merged 1 commit intomainfrom
fix/mirror-test-hang

Conversation

@kacy
Copy link
Copy Markdown
Owner

@kacy kacy commented Apr 2, 2026

Summary

The mirror shadow traffic test (test 567) hangs indefinitely when the detached mirror thread fails to connect to the mirror upstream. The test's TestUpstreamServer.acceptOne() blocks forever on posix.accept() with no timeout.

Set a 5-second SO_RCVTIMEO on the listening socket before spawning the accept thread so accept() returns EAGAIN instead of blocking forever if the mirror connection never arrives.

@kacy kacy merged commit 8904dec into main Apr 2, 2026
2 checks passed
@kacy kacy deleted the fix/mirror-test-hang branch April 2, 2026 19:55
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.

1 participant