From afb90af1db3a08e10c9938dde368ce45cbb3a3f2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 13 Feb 2024 23:14:47 +0100 Subject: [PATCH] cmd/thalos/server.go: in run() set running flag to false before calling shClient.Shutdown() so readerLoop() exists correctly. --- cmd/thalos/server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/thalos/server.go b/cmd/thalos/server.go index e0a2976..412f007 100644 --- a/cmd/thalos/server.go +++ b/cmd/thalos/server.go @@ -143,12 +143,11 @@ func run(processor *app.ShipProcessor) { log.WithField("signal", sig).Info("Signal received") // Cleanly close the connection by sending a close message. + running = false err := shClient.Shutdown() if err != nil { log.WithError(err).Info("failed to send close message to ship server") } - - running = false } func getChain(def string) string {