From b473c12438438a4709708d5d4ecd403d81f11e03 Mon Sep 17 00:00:00 2001 From: Keuin Date: Thu, 8 Sep 2022 00:43:12 +0800 Subject: Bugfix: process won't quit when sending Ctrl-C. Print runtime information to logs in main() function. --- recording/runner.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'recording') diff --git a/recording/runner.go b/recording/runner.go index d4e5a96..bcea9a7 100644 --- a/recording/runner.go +++ b/recording/runner.go @@ -201,6 +201,11 @@ func watcherRecoverableLoop( chWatcherEvent, ) + // the context is cancelled, stop watching + if errors.Is(err, context.Canceled) { + return + } + switch errReason { case ErrSuccess: // stop normally, the context is closed -- cgit v1.2.3