From 5eef932d10c51cd9eeec405536ec29f1fcc4932b Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 29 Nov 2021 11:15:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DTOA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E7=9A=84panic?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/toa_manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/nodes/toa_manager.go b/internal/nodes/toa_manager.go index 3e10ad6..f7c037e 100644 --- a/internal/nodes/toa_manager.go +++ b/internal/nodes/toa_manager.go @@ -42,7 +42,9 @@ func (this *TOAManager) Run(config *nodeconfigs.TOAConfig) error { if err != nil { remotelogs.Error("TOA", "quit error: "+err.Error()) } - _ = this.conn.Close() + if this.conn != nil { + _ = this.conn.Close() + } this.conn = nil this.pid = 0 }