From 03b2d35cd3029991247391c3eed58daef7e42110 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Wed, 4 Feb 2026 08:37:55 -0700 Subject: [PATCH] fix closing --- src/config.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config.go b/src/config.go index b3f684e..39257e8 100755 --- a/src/config.go +++ b/src/config.go @@ -92,13 +92,14 @@ func (c Config) Close() { for i := range c.forwards { if c.forwards[i] != nil { i := i - go func() { + func() { c.forwards[i].New = nil for { got := c.forwards[i].Get() - if got != nil { - go got.(net.Conn).Close() + if got == nil { + break } + got.(net.Conn).Close() } }() }