mirror of https://github.com/fluffle/goirc
move the disconnection event after we are done disconnecting, there is nothing to be done anyway
This commit is contained in:
parent
aff8b79dda
commit
3fdd17a2b8
|
@ -376,13 +376,13 @@ func (conn *Conn) shutdown() {
|
|||
return
|
||||
}
|
||||
logging.Info("irc.shutdown(): Disconnected from server.")
|
||||
conn.dispatch(&Line{Cmd: DISCONNECTED})
|
||||
conn.connected = false
|
||||
conn.sock.Close()
|
||||
close(conn.die)
|
||||
conn.wg.Wait()
|
||||
// reinit datastructures ready for next connection
|
||||
conn.initialise()
|
||||
conn.dispatch(&Line{Cmd: DISCONNECTED})
|
||||
}
|
||||
|
||||
// Dumps a load of information about the current state of the connection to a
|
||||
|
|
Loading…
Reference in New Issue