diff options
author | Keuin <[email protected]> | 2022-09-13 23:46:29 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-09-13 23:46:29 +0800 |
commit | ed3db79b86e9ea2c796cccedf1454a45823293a4 (patch) | |
tree | 678f1a968048b57077b2b4eea0235414c009324a /common/copy.go | |
parent | 6aaed5b0de0ba2e07f497984a8068815a646cd37 (diff) |
Bugfix: task won't stop after Ctrl-C is sent.v0.3.2
Diffstat (limited to 'common/copy.go')
-rw-r--r-- | common/copy.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/copy.go b/common/copy.go index 1d273dc..27bc9ad 100644 --- a/common/copy.go +++ b/common/copy.go @@ -38,6 +38,7 @@ func CopyToFileWithBuffer( for { select { case <-ctx.Done(): + err = ctx.Err() return default: nRead, err = in.Read(buffer[off:Min[int](off+chunkSize, bufSize)]) |