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

index 1ddf7eb4a5870e209f36167ea1ccf93f8f7a5548..992f31576ee1d8ea82d746ed642cc90dfb9fc537 100644 (file)
@@ -124,6 +124,9 @@ func Play(filePath string) (s *Server, close func()) {
                                        if data, e = f.ReadUntil('\n', 70, 1000); e != nil && !errors.Is(e, io.EOF) {
                                                panic(e)
                                        }
+                                       if len(data) == 0 {
+                                               return
+                                       }
                                }
 
                                tIndex := bytes.Index(data, []byte{','})