]> 127.0.0.1 Git - part/.git/commitdiff
fix v0.10.12
authorqydysky <32743305+qydysky@users.noreply.github.com>
Sun, 16 Oct 2022 09:40:12 +0000 (17:40 +0800)
committerqydysky <32743305+qydysky@users.noreply.github.com>
Sun, 16 Oct 2022 09:40:12 +0000 (17:40 +0800)
websocket/Recoder.go

index faa287debc64c1b9f10553c41aa86dea62d02f46..8ce9a1838a2062e08ad88e060060a55bb6676647 100644 (file)
@@ -4,6 +4,7 @@ import (
        "bytes"
        "errors"
        "fmt"
+       "io"
        "strconv"
        "time"
 
@@ -102,7 +103,7 @@ func Play(filePath string, perReadSize int, maxReadSize int) (s *Server, close f
 
                        for sg.Islive() {
                                if data == nil {
-                                       if data, err = f.ReadUntil('\n', perReadSize, maxReadSize); err != nil {
+                                       if data, err = f.ReadUntil('\n', perReadSize, maxReadSize); err != nil && !errors.Is(err, io.EOF) {
                                                panic(err)
                                        }
                                }