From 421d74f370274795821cc699c8c9cbad3bd5ed16 Mon Sep 17 00:00:00 2001 From: runstp Date: Sun, 1 Jan 2023 18:10:11 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D=E6=9C=AA=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=90=AF=E5=8A=A8=E6=A3=80=E6=9F=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/spider/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/spider/main.go b/cmd/spider/main.go index 6fc33a3..6a8c1ad 100644 --- a/cmd/spider/main.go +++ b/cmd/spider/main.go @@ -55,7 +55,10 @@ func lc(lifecycle fx.Lifecycle, spiderVideo *spider.Video, spiderUpdate *spider. lifecycle.Append(fx.Hook{ OnStart: func(ctx context.Context) error { - return checkServer.Run(ctx) + go func() { + _ = checkServer.Run(ctx) + }() + return nil }, OnStop: func(ctx context.Context) error { if err := checkServer.Stop(ctx); err != nil {