manners
manners copied to clipboard
Serving + Closing in 2 separate routines is racy
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
This seems unlikely to cause real problems in production, but if it's causing the race detector to fire then 👍 .
After https://github.com/braintree/manners/pull/37 merged, does this still trigger the race detector?