fix closing

This commit is contained in:
Bel LaPointe
2026-02-04 08:37:55 -07:00
parent 0f52de4204
commit 03b2d35cd3

View File

@@ -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()
}
}()
}