Skip to content

Commit bb323f0

Browse files
committed
onPacket now emits data on 'closing' state as well
1 parent 115f321 commit bb323f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/socket/engineio/client/Socket.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,9 @@ private void onOpen() {
496496
}
497497

498498
private void onPacket(Packet packet) {
499-
if (this.readyState == ReadyState.OPENING || this.readyState == ReadyState.OPEN) {
499+
if (this.readyState == ReadyState.OPENING ||
500+
this.readyState == ReadyState.OPEN ||
501+
this.readyState == ReadyState.CLOSING) {
500502
logger.fine(String.format("socket received: type '%s', data '%s'", packet.type, packet.data));
501503

502504
this.emit(EVENT_PACKET, packet);

0 commit comments

Comments
 (0)