manners icon indicating copy to clipboard operation
manners copied to clipboard

Serving + Closing in 2 separate routines is racy

Open alapidas opened this issue 8 years ago • 2 comments

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 https://github.com/braintree/manners/pull/37

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

alapidas avatar Apr 04 '16 14:04 alapidas

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

lionelbarrow avatar Apr 18 '16 04:04 lionelbarrow

After https://github.com/braintree/manners/pull/37 merged, does this still trigger the race detector?

gliptak avatar Nov 07 '16 23:11 gliptak