Skip to content

Commit

Permalink
ensure all firehose listening servers shut down when one does
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau authored and billettc committed Dec 11, 2024
1 parent d2859f4 commit 83cc510
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions firehose/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ func (s *Server) Launch() {
wg.Add(1)
go func() {
server.Launch(server.listenAddr)
for _, srv := range s.servers {
srv.Shutdown(0) // immediately shutdown all other servers when one terminates, in case a single one failed
}
wg.Done()
}()
}
Expand Down

0 comments on commit 83cc510

Please sign in to comment.