Update Server.Stop docs per code review comments from grpc/grpc-go#540

This commit is contained in:
Brad Fitzpatrick
2016-02-09 23:50:03 +00:00
parent af41c9cc8e
commit 07d3de883f

View File

@ -594,9 +594,11 @@ func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Str
} }
} }
// Stop stops the gRPC server. It immediately closes all open connections and listeners. It cancels all // Stop stops the gRPC server. It immediately closes all open
// active RPCs on server side and the corresponding pending RPCs on client side will get notified by // connections and listeners.
// connection errors. // It cancels all active RPCs on the server side and the corresponding
// pending RPCs on the client side will get notified by connection
// errors.
func (s *Server) Stop() { func (s *Server) Stop() {
s.mu.Lock() s.mu.Lock()
listeners := s.lis listeners := s.lis