]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 录播播放日志
authorqydysky <qydysky@foxmail.com>
Mon, 26 Jun 2023 14:51:28 +0000 (14:51 +0000)
committerqydysky <qydysky@foxmail.com>
Mon, 26 Jun 2023 14:51:28 +0000 (14:51 +0000)
Reply/F.go

index 80c4cd12bc05e8d2cda7ec51585dc96a4394eb91..212c59d95808b7256904b6bf5f4f8279a8139371 100644 (file)
@@ -1416,6 +1416,13 @@ func init() {
                                                        speed = s
                                                }
                                        }
+
+                                       go func() {
+                                               flog.L(`T: `, r.RemoteAddr, `接入录播`, v)
+                                               <-r.Context().Done()
+                                               flog.L(`T: `, r.RemoteAddr, `断开录播`, v)
+                                       }()
+
                                        if e := f.CopyToIoWriter(w, int64(speed), true); e != nil {
                                                flog.L(`E: `, e)
                                        }