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

Serving + Closing in 2 separate routines is racy #38

Open
alapidas opened this issue Apr 4, 2016 · 2 comments
Open

Serving + Closing in 2 separate routines is racy #38

alapidas opened this issue Apr 4, 2016 · 2 comments

Comments

@alapidas
Copy link

alapidas commented Apr 4, 2016

Running ListenAndServe() and Close() in 2 separate routines causes the race detector to pick up a race condition, based on the fact that defaultServer has no synchronization protection around it.

Fixed by #37

Worth noting, this change would make Close() block until ListenAndServe is actually called

@lionelbarrow
Copy link
Contributor

This seems unlikely to cause real problems in production, but if it's causing the race detector to fire then 👍 .

@gliptak
Copy link

gliptak commented Nov 7, 2016

After #37 merged, does this still trigger the race detector?

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

No branches or pull requests

3 participants