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
|
||||
}
|
||||
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