From 4adaf80797ce5d9cad39d617342488af9871f2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B8=E6=9D=B0?= Date: Thu, 27 May 2021 16:02:39 +0800 Subject: [PATCH 1/2] fix watchchan not exit --- pilot/filebeat_piloter.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pilot/filebeat_piloter.go b/pilot/filebeat_piloter.go index 4b8077cb..f05389da 100644 --- a/pilot/filebeat_piloter.go +++ b/pilot/filebeat_piloter.go @@ -266,6 +266,8 @@ func (p *FilebeatPiloter) Start() error { // try to restart filebeat log.Warningf("filebeat exited and try to restart") filebeat = nil + // close watch + p.watchDone <- true p.Start() }() From 40487bcf1422659dc7dd0516143acc9cd66436dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B8=E6=9D=B0?= Date: Thu, 27 May 2021 16:19:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=EF=BC=8C=E5=86=85=E5=AD=98=E6=B2=A1=E9=87=8A?= =?UTF-8?q?=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pilot/filebeat_piloter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 pilot/filebeat_piloter.go diff --git a/pilot/filebeat_piloter.go b/pilot/filebeat_piloter.go old mode 100644 new mode 100755 index f05389da..d14db44c --- a/pilot/filebeat_piloter.go +++ b/pilot/filebeat_piloter.go @@ -266,8 +266,7 @@ func (p *FilebeatPiloter) Start() error { // try to restart filebeat log.Warningf("filebeat exited and try to restart") filebeat = nil - // close watch - p.watchDone <- true + p.watchDone <- true p.Start() }()