diff options
Diffstat (limited to 'bilibili/streaming.go')
-rw-r--r-- | bilibili/streaming.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/bilibili/streaming.go b/bilibili/streaming.go index 5407043..f6ffac9 100644 --- a/bilibili/streaming.go +++ b/bilibili/streaming.go @@ -62,11 +62,7 @@ func (b Bilibili) CopyLiveStream( // blocking copy n, err := common.Copy(ctx, out, resp.Body) - if errors.Is(err, context.Canceled) { - // cancelled by context - // this error is useless - err = nil - } else { + if !errors.Is(err, context.Canceled) { // real error happens b.error.Printf("Stream copying was interrupted unexpectedly: %v", err) } |