fix binary
This commit is contained in:
parent
bd88ff763b
commit
9454a47ef4
@ -252,7 +252,7 @@ struct SocketPacket {
|
|||||||
case _ where ack:
|
case _ where ack:
|
||||||
return PacketType.BINARY_ACK
|
return PacketType.BINARY_ACK
|
||||||
default:
|
default:
|
||||||
return PacketType.EVENT
|
return PacketType.ERROR
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -220,7 +220,7 @@ class SocketParser {
|
|||||||
var packet = socket.waitingData.removeAtIndex(0)
|
var packet = socket.waitingData.removeAtIndex(0)
|
||||||
packet.fillInPlaceholders()
|
packet.fillInPlaceholders()
|
||||||
|
|
||||||
if packet.type == SocketPacket.PacketType.BINARY_ACK {
|
if packet.type != SocketPacket.PacketType.BINARY_ACK {
|
||||||
socket.handleEvent(packet.getEvent(), data: packet.getArgs(),
|
socket.handleEvent(packet.getEvent(), data: packet.getArgs(),
|
||||||
wantsAck: packet.id)
|
wantsAck: packet.id)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user