diff --git a/src/main/java/com/corundumstudio/socketio/handler/PacketListener.java b/src/main/java/com/corundumstudio/socketio/handler/PacketListener.java index c3583ff3..8be1e287 100644 --- a/src/main/java/com/corundumstudio/socketio/handler/PacketListener.java +++ b/src/main/java/com/corundumstudio/socketio/handler/PacketListener.java @@ -80,6 +80,7 @@ public void onPacket(Packet packet, NamespaceClient client, Transport transport) if (packet.getSubType() == PacketType.DISCONNECT) { client.onDisconnect(); + break; } if (packet.getSubType() == PacketType.CONNECT) { @@ -87,10 +88,12 @@ public void onPacket(Packet packet, NamespaceClient client, Transport transport) namespace.onConnect(client); // send connect handshake packet back to client client.getBaseClient().send(packet, transport); + break; } if (packet.getSubType() == PacketType.ACK) { ackManager.onAck(client, packet); + break; } if (packet.getSubType() == PacketType.EVENT @@ -101,6 +104,7 @@ public void onPacket(Packet packet, NamespaceClient client, Transport transport) args = packet.getData(); } namespace.onEvent(client, packet.getName(), args, ackRequest); + break; } break; }