move the disconnection event after we are done disconnecting, there is nothing to be done anyway

This commit is contained in:
Peter SZTANOJEV 2014-05-31 20:34:21 +02:00
parent aff8b79dda
commit 3fdd17a2b8
1 changed files with 1 additions and 1 deletions

View File

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