]> 127.0.0.1 Git - part/.git/commitdiff
Fix v0.22.14
authorqydysky <32743305+qydysky@users.noreply.github.com>
Wed, 15 Feb 2023 19:29:59 +0000 (03:29 +0800)
committerqydysky <32743305+qydysky@users.noreply.github.com>
Wed, 15 Feb 2023 19:29:59 +0000 (03:29 +0800)
websocket/Recoder.go

index ce6e6248d0b4cd52f05918623ade78175913257f..a523b5bdc188859642bb9877a602c8eb8f84ef5e 100644 (file)
@@ -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{','})