1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-07-04 20:39:40 +00:00

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

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