Merge pull request #1 from padlocks/dev

add heartbeat global
This commit is contained in:
bee! 2022-03-01 20:01:21 -08:00 committed by GitHub
commit cb07460d30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ function WebSocketClient(url) {
clearTimeout(timeout) clearTimeout(timeout)
timeout = undefined timeout = undefined
} }
timeout = setTimeout(() => client.terminate(), 350000) timeout = setTimeout(() => client.terminate(), process.env.heartbeat || 350000)
} }
client.on('ping', () => { client.on('ping', () => {
console.log(`::SimplyWS:: [${timestamp()}] pinged`) console.log(`::SimplyWS:: [${timestamp()}] pinged`)