mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
fix data race issue in unit testing cases for gtcp
This commit is contained in:
@ -105,11 +105,11 @@ func (s *Server) SetTLSConfig(tlsConfig *tls.Config) {
|
||||
|
||||
// Close closes the listener and shutdowns the server.
|
||||
func (s *Server) Close() error {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
if s.listen == nil {
|
||||
return nil
|
||||
}
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
return s.listen.Close()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user