mirror of https://github.com/fluffle/goirc
Merge pull request #43 from sztanpet/disconnectevent
Send the disconnect event after doing the disconnection logic
This commit is contained in:
commit
0ea3254693
|
@ -376,13 +376,13 @@ func (conn *Conn) shutdown() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logging.Info("irc.shutdown(): Disconnected from server.")
|
logging.Info("irc.shutdown(): Disconnected from server.")
|
||||||
conn.dispatch(&Line{Cmd: DISCONNECTED})
|
|
||||||
conn.connected = false
|
conn.connected = false
|
||||||
conn.sock.Close()
|
conn.sock.Close()
|
||||||
close(conn.die)
|
close(conn.die)
|
||||||
conn.wg.Wait()
|
conn.wg.Wait()
|
||||||
// reinit datastructures ready for next connection
|
// reinit datastructures ready for next connection
|
||||||
conn.initialise()
|
conn.initialise()
|
||||||
|
conn.dispatch(&Line{Cmd: DISCONNECTED})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dumps a load of information about the current state of the connection to a
|
// Dumps a load of information about the current state of the connection to a
|
||||||
|
|
Loading…
Reference in New Issue