mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-09 15:08:12 -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
|
// Socket is live - any packet counts
|
||||||
this.emitReserved("heartbeat");
|
this.emitReserved("heartbeat");
|
||||||
this._resetPingTimeout();
|
|
||||||
|
|
||||||
switch (packet.type) {
|
switch (packet.type) {
|
||||||
case "open":
|
case "open":
|
||||||
@@ -585,6 +584,7 @@ export class SocketWithoutUpgrade extends Emitter<
|
|||||||
this._sendPacket("pong");
|
this._sendPacket("pong");
|
||||||
this.emitReserved("ping");
|
this.emitReserved("ping");
|
||||||
this.emitReserved("pong");
|
this.emitReserved("pong");
|
||||||
|
this._resetPingTimeout();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "error":
|
case "error":
|
||||||
|
|||||||
Reference in New Issue
Block a user