no more delay on pings

canary
Bronwen 2021-04-01 23:21:39 -04:00
parent 966dc965f2
commit 556b940cc1
3 changed files with 8 additions and 9 deletions

View File

@ -136,9 +136,7 @@ class STPSocket extends EventEmitter {
}
if (this.readyState === this.SECURED && obj.cmd === 'PING') {
setTimeout(() => {
this.tcpSocket.write(new PongPacket(obj.data.id).toBuffer());
}, 1000);
return;
}

View File

@ -19,7 +19,8 @@
},
"scripts": {
"relay": "supervisor -w relay,lib -n exit relay/index.js",
"relay:service": "supervisor -- relay/service"
"relay:service": "supervisor -- relay/service",
"sloc": "find lib -type f | xargs wc -l"
},
"dependencies": {
"bonjour": "^3.5.0",