From 0b2c26847ba1bedaa0b31585b8247e3d52537e90 Mon Sep 17 00:00:00 2001 From: Mikhail Bragin Date: Tue, 26 Oct 2021 21:49:05 +0200 Subject: [PATCH] fix: return ctx error when UP command exists (#140) --- client/cmd/up.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/cmd/up.go b/client/cmd/up.go index 6392ee955..181d585e5 100644 --- a/client/cmd/up.go +++ b/client/cmd/up.go @@ -191,8 +191,12 @@ func runClient() error { return err } - log.Info("stopped Wiretrustee client") - cleanupCh <- struct{}{} + go func() { + cleanupCh <- struct{}{} + }() + + log.Info("stopped Wiretrustee client") + + return ctx.Err() - return nil }