From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Wed, 15 Feb 2023 19:07:25 +0000 (+0800) Subject: Fix X-Git-Tag: v0.22.10 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=f743875bf3fe0a71b2c948a8064b350439854584;p=part%2F.git Fix --- diff --git a/websocket/Recoder.go b/websocket/Recoder.go index 52c2a2c..6b3f278 100644 --- a/websocket/Recoder.go +++ b/websocket/Recoder.go @@ -4,6 +4,7 @@ import ( "bytes" "errors" "fmt" + "io" "strconv" "time" @@ -95,7 +96,7 @@ func Play(filePath string) (s *Server, close func()) { timer := time.NewTicker(time.Second) defer timer.Stop() - if data, e := f.ReadAll(humanize.KByte, humanize.MByte); e != nil { + if data, e := f.ReadAll(humanize.KByte, humanize.MByte); e != nil && !errors.Is(e, io.EOF) { panic(e) } else { var (