Ensure the time field is populated on the pseudo line events, such as connecting and disconnecting.

This commit is contained in:
Andrew Brampton 2014-11-30 15:42:08 -08:00
parent 28d81b1146
commit 706c90baa3
1 changed files with 2 additions and 2 deletions

View File

@ -246,7 +246,7 @@ func (conn *Conn) Connect() error {
}
conn.connected = true
conn.postConnect(true)
conn.dispatch(&Line{Cmd: REGISTER})
conn.dispatch(&Line{Cmd: REGISTER, Time: time.Now()})
return nil
}
@ -400,7 +400,7 @@ func (conn *Conn) shutdown() {
conn.wg.Wait()
// reinit datastructures ready for next connection
conn.initialise()
conn.dispatch(&Line{Cmd: DISCONNECTED})
conn.dispatch(&Line{Cmd: DISCONNECTED, Time: time.Now()})
}
// Dumps a load of information about the current state of the connection to a