Commit 22549b03 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Fix race condition issue where listner could become nil

parent 5007b240
......@@ -46,16 +46,16 @@ func (s *Server) Start() error {
}
// Start accepting connections
go func() {
go func(l net.Listener) {
for {
conn, err := s.listener.Accept()
conn, err := l.Accept()
if err != nil {
break
}
go s.server.ServeConn(conn)
}
}()
}(s.listener)
return nil
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment