Skip to content

Commit 7a23dde

Browse files
committedSep 18, 2024
perf: do not reset the hearbeat timer on each packet
This reverts ed34a45 See also: socketio/engine.io@5359bae
1 parent 60c757f commit 7a23dde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/engine.io-client/lib/socket.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ export class SocketWithoutUpgrade extends Emitter<
574574

575575
// Socket is live - any packet counts
576576
this.emitReserved("heartbeat");
577-
this._resetPingTimeout();
578577

579578
switch (packet.type) {
580579
case "open":
@@ -585,6 +584,7 @@ export class SocketWithoutUpgrade extends Emitter<
585584
this._sendPacket("pong");
586585
this.emitReserved("ping");
587586
this.emitReserved("pong");
587+
this._resetPingTimeout();
588588
break;
589589

590590
case "error":

0 commit comments

Comments
 (0)
Please sign in to comment.