From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Wed, 15 Feb 2023 19:29:59 +0000 (+0800) Subject: Fix X-Git-Tag: v0.22.14 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=caf7c743e7f3e465de33f380f526357bd224230f;p=part%2F.git Fix --- diff --git a/websocket/Recoder.go b/websocket/Recoder.go index ce6e624..a523b5b 100644 --- a/websocket/Recoder.go +++ b/websocket/Recoder.go @@ -4,6 +4,7 @@ import ( "bytes" "errors" "fmt" + "io" "strconv" "time" @@ -116,7 +117,7 @@ func Play(filePath string) (s *Server, close func()) { cu += 1 for sg.Islive() { - if data, e := f.ReadUntil('\n', humanize.KByte, humanize.MByte); e != nil { + if data, e := f.ReadUntil('\n', humanize.KByte, humanize.MByte); e != nil && !errors.Is(e, io.EOF) { panic(e) } else { tIndex := bytes.Index(data, []byte{','})