From 2bb098e94064fc349b7f3d46e8fe6e216216971c Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 23 Jan 2023 15:48:54 -0800 Subject: [PATCH] exit stdin loop on error, force a sigkill after 10s --- cmd/main-server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/main-server.go b/cmd/main-server.go index d3fef53d..ed7db32a 100644 --- a/cmd/main-server.go +++ b/cmd/main-server.go @@ -434,8 +434,11 @@ func stdinReadWatch() { sendTelemetryWrapper() time.Sleep(1 * time.Second) syscall.Kill(syscall.Getpid(), syscall.SIGINT) + break } } + time.Sleep(10 * time.Second) + syscall.Kill(syscall.Getpid(), syscall.SIGKILL) } func main() {