move our is-connected one half roundtrip sooner
This commit is contained in:
parent
59c56fea1b
commit
0adc13ddfa
@ -245,12 +245,7 @@ func (this *HubConnection) processProtocolMessage(message string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "$UserIP":
|
case "$UserIP":
|
||||||
// Final message in PtokaX connection handshake - trigger connection callback.
|
// TODO
|
||||||
// This might not be the case for other hubsofts, though
|
|
||||||
if this.State != CONNECTIONSTATE_CONNECTED {
|
|
||||||
this.processEvent(HubEvent{EventType: EVENT_CONNECTION_STATE_CHANGED, StateChange: CONNECTIONSTATE_CONNECTED})
|
|
||||||
this.State = CONNECTIONSTATE_CONNECTED
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$ForceMove":
|
case "$ForceMove":
|
||||||
this.Hco.Address = HubAddress(commandParts[1])
|
this.Hco.Address = HubAddress(commandParts[1])
|
||||||
@ -290,11 +285,18 @@ func (this *HubConnection) processProtocolMessage(message string) {
|
|||||||
if _, ok := this.supports["QuickList"]; ok {
|
if _, ok := this.supports["QuickList"]; ok {
|
||||||
this.SayInfo()
|
this.SayInfo()
|
||||||
this.SayRaw("$GetNickList|")
|
this.SayRaw("$GetNickList|")
|
||||||
this.sentOurHello = true
|
|
||||||
} else {
|
} else {
|
||||||
this.SayRaw("$ValidateNick " + Escape(this.Hco.Self.Nick) + "|")
|
this.SayRaw("$ValidateNick " + Escape(this.Hco.Self.Nick) + "|")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This also counts as the end of the handshake from our POV. Consider
|
||||||
|
// ourselves logged in
|
||||||
|
this.sentOurHello = true
|
||||||
|
if this.State != CONNECTIONSTATE_CONNECTED {
|
||||||
|
this.processEvent(HubEvent{EventType: EVENT_CONNECTION_STATE_CHANGED, StateChange: CONNECTIONSTATE_CONNECTED})
|
||||||
|
this.State = CONNECTIONSTATE_CONNECTED
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IGNORABLE COMMANDS
|
// IGNORABLE COMMANDS
|
||||||
|
Loading…
Reference in New Issue
Block a user