Skip to content

Commit 37474c7

Browse files
authored
1 parent fe5d97f commit 37474c7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/socket.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class Socket extends EventEmitter {
137137
return;
138138
}
139139
debug("got pong");
140-
this.schedulePing();
140+
this.pingIntervalTimer.refresh();
141141
this.emit("heartbeat");
142142
break;
143143

@@ -170,7 +170,6 @@ export class Socket extends EventEmitter {
170170
* @api private
171171
*/
172172
private schedulePing() {
173-
clearTimeout(this.pingIntervalTimer);
174173
this.pingIntervalTimer = setTimeout(() => {
175174
debug(
176175
"writing ping packet - expecting pong within %sms",

0 commit comments

Comments
 (0)