mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-08 22:48:20 -05:00
perf: do not reset the hearbeat timer on each packet
This revertsed34a45a07See also:5359bae683
This commit is contained in:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user