Introduce a websocket ping check that closes the socket if no response.
This commit is contained in:
@@ -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