1
0
Fork 0
forked from External/ergo

Merge pull request #1150 from slingamn/monitor.1

fix #1053, #1083
This commit is contained in:
Shivaram Lingamneni 2020-06-22 20:25:27 -07:00 committed by GitHub
commit 7ee7b1aab5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 46 deletions

View file

@ -1316,6 +1316,9 @@ func (client *Client) destroy(session *Session) {
session.SetDestroyed()
session.socket.Close()
// clean up monitor state
client.server.monitorManager.RemoveAll(session)
// remove from connection limits
var source string
if session.isTor {
@ -1381,8 +1384,6 @@ func (client *Client) destroy(session *Session) {
if registered {
client.server.monitorManager.AlertAbout(details.nick, details.nickCasefolded, false)
}
// clean up monitor state
client.server.monitorManager.RemoveAll(client)
// clean up channels
// (note that if this is a reattach, client has no channels and therefore no friends)