bug fix: do not access RemoteAddr on nil net.Conn

This commit is contained in:
iamqizhao
2015-09-24 18:44:03 -07:00
parent efb129eb20
commit d39eb0802f

View File

@ -233,7 +233,7 @@ func (s *Server) Serve(lis net.Listener) error {
conn, authInfo, err = creds.ServerHandshake(c)
if err != nil {
s.mu.Lock()
s.errorf("ServerHandshake failed: %v", c.RemoteAddr(), err)
s.errorf("ServerHandshake(%q) failed: %v", c.RemoteAddr(), err)
s.mu.Unlock()
grpclog.Println("grpc: Server.Serve failed to complete security handshake.")
continue