mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-19 21:59:59 -08:00
Remove client from Server's internal state before shutting everything down (closing channels, sockets, etc.). Attempt to fix spurious cryptResync crash.
This commit is contained in:
parent
7c46c9d140
commit
1827b32d55
1 changed files with 3 additions and 2 deletions
|
|
@ -142,6 +142,9 @@ func (client *Client) Panicf(format string, v ...interface{}) {
|
||||||
func (client *Client) disconnect(kicked bool) {
|
func (client *Client) disconnect(kicked bool) {
|
||||||
if !client.disconnected {
|
if !client.disconnected {
|
||||||
client.disconnected = true
|
client.disconnected = true
|
||||||
|
client.server.RemoveClient(client, kicked)
|
||||||
|
|
||||||
|
// Close the client's UDP reciever goroutine.
|
||||||
close(client.udprecv)
|
close(client.udprecv)
|
||||||
|
|
||||||
// If the client paniced during authentication, before reaching
|
// If the client paniced during authentication, before reaching
|
||||||
|
|
@ -163,9 +166,7 @@ func (client *Client) disconnect(kicked bool) {
|
||||||
close(client.msgchan)
|
close(client.msgchan)
|
||||||
|
|
||||||
client.Printf("Disconnected")
|
client.Printf("Disconnected")
|
||||||
|
|
||||||
client.conn.Close()
|
client.conn.Close()
|
||||||
client.server.RemoveClient(client, kicked)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue