diff options
author | Rasmus Dahlberg <rasmus@rgdd.se> | 2023-03-26 12:09:56 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@rgdd.se> | 2023-03-26 12:09:56 +0200 |
commit | 906527914c2847f2fda763a1ed231cd6e021b1ed (patch) | |
tree | cf3edb8863bdd2e4dc7fc71760735b9ffe4efa3d | |
parent | f405a55ab7ab67599361156495628356864acef5 (diff) |
Wait timeout + 1s before exit
-rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } |