mirror of
https://github.com/quexten/goldwarden.git
synced 2024-11-27 11:02:46 +03:00
Update websocket.go
This commit is contained in:
parent
d32147bdf8
commit
79bfc43ab8
@ -255,12 +255,11 @@ func parseMessageTypeFromMessagePack(messagePack []byte) (int8, string, bool) {
|
|||||||
return 0, "", false
|
return 0, "", false
|
||||||
}
|
}
|
||||||
if len(value) < 5 {
|
if len(value) < 5 {
|
||||||
websocketLog.Warn("Invalid message received, length too short")
|
|
||||||
return 0, "", false
|
return 0, "", false
|
||||||
}
|
}
|
||||||
value, success := value[4].([]interface{})
|
value, success := value[4].([]interface{})
|
||||||
if len(value) < 1 || !success {
|
if len(value) < 1 || !success {
|
||||||
websocketLog.Warn("Invalid message received, length too short")
|
websocketLog.Warn("Invalid message received, value length less than 1")
|
||||||
return 0, "", false
|
return 0, "", false
|
||||||
}
|
}
|
||||||
value1, success := value[0].(map[string]interface{})
|
value1, success := value[0].(map[string]interface{})
|
||||||
|
Loading…
Reference in New Issue
Block a user