perf: do not reset the hearbeat timer on each packet

This reverts ed34a45a07

See also: 5359bae683
This commit is contained in:
Damien Arrachequesne
2024-09-18 11:06:39 +02:00
parent 60c757f718
commit 7a23dde6ef

View File

@@ -574,7 +574,6 @@ export class SocketWithoutUpgrade extends Emitter<
// Socket is live - any packet counts
this.emitReserved("heartbeat");
this._resetPingTimeout();
switch (packet.type) {
case "open":
@@ -585,6 +584,7 @@ export class SocketWithoutUpgrade extends Emitter<
this._sendPacket("pong");
this.emitReserved("ping");
this.emitReserved("pong");
this._resetPingTimeout();
break;
case "error":