mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-13 07:29:30 +01:00
remove redundant friends computation
This commit is contained in:
parent
b97ae00fe3
commit
ef35c587fc
@ -684,8 +684,6 @@ func (client *Client) destroy(beingResumed bool) {
|
||||
// send quit/error message to client if they haven't been sent already
|
||||
client.Quit("Connection closed")
|
||||
|
||||
friends := client.Friends()
|
||||
friends.Remove(client)
|
||||
if !beingResumed {
|
||||
client.server.whoWas.Append(client)
|
||||
}
|
||||
@ -703,6 +701,7 @@ func (client *Client) destroy(beingResumed bool) {
|
||||
client.server.monitorManager.RemoveAll(client)
|
||||
|
||||
// clean up channels
|
||||
friends := make(ClientSet)
|
||||
for _, channel := range client.Channels() {
|
||||
if !beingResumed {
|
||||
channel.Quit(client)
|
||||
@ -711,6 +710,7 @@ func (client *Client) destroy(beingResumed bool) {
|
||||
friends.Add(member)
|
||||
}
|
||||
}
|
||||
friends.Remove(client)
|
||||
|
||||
// clean up server
|
||||
if !beingResumed {
|
||||
|
Loading…
Reference in New Issue
Block a user