From e36a15c7069e528cd989e49848c35111036ca961 Mon Sep 17 00:00:00 2001 From: 7x11x13 Date: Sat, 13 Jul 2024 11:19:30 -0400 Subject: [PATCH] Close connection before reopening --- bridge/soulseek/soulseek.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bridge/soulseek/soulseek.go b/bridge/soulseek/soulseek.go index ade8fded..bf891203 100644 --- a/bridge/soulseek/soulseek.go +++ b/bridge/soulseek/soulseek.go @@ -108,6 +108,8 @@ func (b *Bsoulseek) loginLoop() { if !firstConnect { // Cleanup as we are making new sender/receiver routines b.fatalErrors = make(chan error) + err := b.conn.Close() + b.Log.Errorf("Error closing conn: %s", err) close(b.messagesToSend) } // Connect to slsk server