Introduce a websocket ping check that closes the socket if no response.
This commit is contained in:
1 parent
c7ddeecd18
commit
550679f17e
2 files changed
+31
-4
No files matched your search
@@ -74,6 +74,10 @@ class WebsocketHandler {
|
||||
'git-commit': this.latestGitCommitHash
|
||||
}));
|
||||
}
|
||||
|
||||
if (parsedMessage.action === 'ping') {
|
||||
client.send(JSON.stringify({'pong': true}));
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user