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

transport.Manager.Stop() returns before closing all sockets #20

Open
StefanKopieczek opened this issue Aug 4, 2015 · 2 comments
Open
Assignees
Labels

Comments

@StefanKopieczek
Copy link
Owner

... they close shortly afterwards, but there's a race window where Stop() has returned but the sockets are still bound.

This means that the sockets can't be reused immediately – subsequent binds might fail with a "socket in use" if they happen too soon after the previous manager is stopped.

In particular this causes occasional failures in the transport tests.

StefanKopieczek added a commit that referenced this issue Aug 4, 2015
Issue #20 means that stopping a transport manager doesn't cause all
sockets to close right away - there's a short window where they're still
bound. So as a temporary workaround, add a sleep to the tests.

(cherry picked from commit 431c26dcf08a4cfe0364ba0b079a82e289578628)
@StefanKopieczek
Copy link
Owner Author

Workaround for the transport tests in 23a7ded
Please remove when this issue is fixed.

@StefanKopieczek StefanKopieczek self-assigned this Aug 5, 2015
@StefanKopieczek
Copy link
Owner Author

This is an easy enough fix, but I'll wait for issue13 to get merged, since there's no point editing the connTable when that commit completely changes the model.

Fix will be to add a 'stopped' bool channel to the connTable and connWatchers, to allow the caller to block until the callee has stopped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant