fix: check the type of the initial packet
Before this fix, the client could mark the polling transport as open
even though the handshake packet was not received properly (for
example, after a parsing error).
See also: 1c8cba8818
This commit is contained in:
@@ -114,7 +114,7 @@ abstract public class Polling extends Transport {
|
|||||||
Parser.DecodePayloadCallback callback = new Parser.DecodePayloadCallback() {
|
Parser.DecodePayloadCallback callback = new Parser.DecodePayloadCallback() {
|
||||||
@Override
|
@Override
|
||||||
public boolean call(Packet packet, int index, int total) {
|
public boolean call(Packet packet, int index, int total) {
|
||||||
if (self.readyState == ReadyState.OPENING) {
|
if (self.readyState == ReadyState.OPENING && Packet.OPEN.equals(packet.type)) {
|
||||||
self.onOpen();
|
self.onOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user