another data race

This commit is contained in:
Josh Baker 2016-08-22 11:07:42 -07:00
parent 9b5818be06
commit 869d600179
1 changed files with 2 additions and 0 deletions

View File

@ -113,7 +113,9 @@ func (s *Server) ListenServeAndSignal(signal chan error) error {
if signal != nil {
signal <- nil
}
s.mu.Lock()
s.ln = ln.(*net.TCPListener)
s.mu.Unlock()
defer func() {
ln.Close()
func() {