From 32f4730a9c422af003c22d99501a1567a3920717 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Tue, 27 Dec 2022 18:55:20 -0700 Subject: [PATCH] Fix another thing --- agent/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/main.go b/agent/main.go index 6d27742..c860add 100644 --- a/agent/main.go +++ b/agent/main.go @@ -197,6 +197,9 @@ func handler(w http.ResponseWriter, r *http.Request) { case <-exitChan2: case <-ms.ClosedChan: } + // Wait a bit to send any pending messages before closing the + // connection. + time.Sleep(1 * time.Second) return }