From: qydysky Date: Sun, 30 Mar 2025 17:06:04 +0000 (+0800) Subject: 1 (#41) X-Git-Tag: v0.28.20250330170611 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=df9c015d943b8b525c9b681e8198a3d6f1c68074;p=part%2F.git 1 (#41) --- diff --git a/websocket/Recoder.go b/websocket/Recoder.go index 50cfd4a..4b86a7e 100644 --- a/websocket/Recoder.go +++ b/websocket/Recoder.go @@ -46,13 +46,13 @@ func (t *Recorder) Start(filePath string) error { } f.Create() + t.stopflag = ctx.CarryCancel(context.WithCancel(context.Background())) + go func() { defer f.Close() var startTimeStamp time.Time - t.stopflag = ctx.CarryCancel(context.WithCancel(context.Background())) - if startTimeStamp.IsZero() { startTimeStamp = time.Now() }