1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-08-28 20:38:13 +02:00

cmd/thalos/server.go: in run() set running flag to false before calling shClient.Shutdown() so readerLoop() exists correctly.

This commit is contained in:
Henrik Hautakoski 2024-02-13 23:14:47 +01:00
parent 775760ec32
commit afb90af1db

View file

@ -143,12 +143,11 @@ func run(processor *app.ShipProcessor) {
log.WithField("signal", sig).Info("Signal received") log.WithField("signal", sig).Info("Signal received")
// Cleanly close the connection by sending a close message. // Cleanly close the connection by sending a close message.
running = false
err := shClient.Shutdown() err := shClient.Shutdown()
if err != nil { if err != nil {
log.WithError(err).Info("failed to send close message to ship server") log.WithError(err).Info("failed to send close message to ship server")
} }
running = false
} }
func getChain(def string) string { func getChain(def string) string {