From df9c015d943b8b525c9b681e8198a3d6f1c68074 Mon Sep 17 00:00:00 2001 From: qydysky Date: Mon, 31 Mar 2025 01:06:04 +0800 Subject: [PATCH] 1 (#41) --- websocket/Recoder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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() } -- 2.39.2