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 committed Nov 18, 2024
1 parent 4b8bf06 commit 80a66c2
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 80a66c2

Please sign in to comment.