change 1 line fix everything
This commit is contained in:
parent
328bdf533a
commit
fd87d15069
@ -28,7 +28,7 @@ function createSocket(events) {
|
|||||||
// Outgoing
|
// Outgoing
|
||||||
// -------------
|
// -------------
|
||||||
function send(msg) {
|
function send(msg) {
|
||||||
if (msg.method !== 'Ping') console.log('outgoing msg', msg);
|
// if (msg[0] !== 'Ping') console.log('outgoing msg', msg);
|
||||||
ws.send(cbor.encode(msg));
|
ws.send(cbor.encode(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ function createSocket(events) {
|
|||||||
let pongTimeout;
|
let pongTimeout;
|
||||||
function onPong() {
|
function onPong() {
|
||||||
events.setPing(Date.now() - ping);
|
events.setPing(Date.now() - ping);
|
||||||
pongTimeout = setTimeout(sendPing, 1000);
|
// pongTimeout = setTimeout(sendPing, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------
|
// -------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user