Close connection before reopening

This commit is contained in:
7x11x13 2024-07-13 11:19:30 -04:00
parent 968d3bf6bf
commit e36a15c706

View File

@ -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