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 }