Merge pull request #43 from sztanpet/disconnectevent

Send the disconnect event after doing the disconnection logic
This commit is contained in:
Alex Bee 2014-06-14 15:46:23 +01:00
commit 0ea3254693
1 changed files with 1 additions and 1 deletions

View File

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