aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-03-26 12:09:56 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2023-03-26 12:09:56 +0200
commit906527914c2847f2fda763a1ed231cd6e021b1ed (patch)
treecf3edb8863bdd2e4dc7fc71760735b9ffe4efa3d
parentf405a55ab7ab67599361156495628356864acef5 (diff)
Wait timeout + 1s before exit
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index b726dd1..e4d2027 100644
--- a/main.go
+++ b/main.go
@@ -202,7 +202,7 @@ func workAggregator(ctx context.Context, opts options.Options, answerCh chan qna
select {
case a := <-answerCh:
handleAnswer(a)
- case <-time.After(opts.Timeout):
+ case <-time.After(opts.Timeout + time.Second):
return
}
}
@@ -260,7 +260,7 @@ func workGenerator(ctx context.Context, opts options.Options, fp *os.File, quest
select {
case <-ctx.Done():
- case <-time.After(opts.Timeout):
+ case <-time.After(opts.Timeout + time.Second):
}
return nextLine, true
}