fix a nil map access bug
This commit is contained in:
@ -274,7 +274,12 @@ func (s *Server) Serve(lis net.Listener) error {
|
|||||||
grpclog.Println("grpc: Server.Serve failed to create ServerTransport: ", err)
|
grpclog.Println("grpc: Server.Serve failed to create ServerTransport: ", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
defer st.Close()
|
||||||
s.mu.Lock()
|
s.mu.Lock()
|
||||||
|
if s.conns == nil {
|
||||||
|
s.mu.Unlock()
|
||||||
|
return
|
||||||
|
}
|
||||||
s.conns[st] = true
|
s.conns[st] = true
|
||||||
s.mu.Unlock()
|
s.mu.Unlock()
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
Reference in New Issue
Block a user