mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-06 22:30:57 +00:00
Fix failure-to-hello check
This commit is contained in:
parent
26ac45358e
commit
f31a93f790
2 changed files with 4 additions and 5 deletions
|
@ -128,9 +128,6 @@ func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
client.VersionString = copyString(version)
|
|
||||||
client.Version = VersionFromString(version)
|
|
||||||
|
|
||||||
if clientIDStr, ok := ary[1].(string); ok {
|
if clientIDStr, ok := ary[1].(string); ok {
|
||||||
client.ClientID = uuid.FromStringOrNil(clientIDStr)
|
client.ClientID = uuid.FromStringOrNil(clientIDStr)
|
||||||
if client.ClientID == uuid.Nil {
|
if client.ClientID == uuid.Nil {
|
||||||
|
@ -146,9 +143,11 @@ func C2SHello(conn *websocket.Conn, client *ClientInfo, msg ClientMessage) (rmsg
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client.VersionString = copyString(version)
|
||||||
|
client.Version = VersionFromString(version)
|
||||||
uniqueUserChannel <- client.ClientID
|
uniqueUserChannel <- client.ClientID
|
||||||
|
|
||||||
SubscribeGlobal(client)
|
SubscribeGlobal(client)
|
||||||
|
client.HelloOK = true
|
||||||
|
|
||||||
jsTime := float64(time.Now().UnixNano()/1000) / 1000
|
jsTime := float64(time.Now().UnixNano()/1000) / 1000
|
||||||
return ClientMessage{
|
return ClientMessage{
|
||||||
|
|
|
@ -430,7 +430,7 @@ func runSocketWriter(conn *websocket.Conn, client *ClientInfo, errorChan <-chan
|
||||||
}
|
}
|
||||||
|
|
||||||
case msg := <-clientChan:
|
case msg := <-clientChan:
|
||||||
if client.VersionString == "" && msg.Command != HelloCommand {
|
if !client.HelloOK && msg.Command != HelloCommand {
|
||||||
return CloseFirstMessageNotHello
|
return CloseFirstMessageNotHello
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue