Skip to content

Commit

Permalink
Clarify that Stop cancels running call handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Mar 17, 2023
1 parent 370c1eb commit cf1bb22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,9 @@ func (s *Server) pushReq(ctx context.Context, wantID bool, method string, params
return rsp, err
}

// Stop shuts down the server. It is safe to call this method multiple times or
// from concurrent goroutines; it will only take effect once.
// Stop shuts down the server. All in-progress call handlers are cancelled. It
// is safe to call this method multiple times or from concurrent goroutines; it
// will only take effect once.
func (s *Server) Stop() {
s.mu.Lock()
defer s.mu.Unlock()
Expand Down

0 comments on commit cf1bb22

Please sign in to comment.