Skip to content

Commit

Permalink
server: make waitForServerConnRemoval lock comment part of godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
fho committed Oct 30, 2023
1 parent 8bc0f7b commit d976997
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1889,8 +1889,9 @@ func (s *Server) stop(graceful bool) {
s.finishEventLog()
}

// s.mu must be held by the caller.
// waitForServerConnRemoval blocks until s.conns is empty.
//
// s.mu must be held by the caller.
func (s *Server) waitForServerConnRemoval() {
for len(s.conns) != 0 {
s.cv.Wait()
Expand Down

0 comments on commit d976997

Please sign in to comment.