mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 10:46:14 +10:00
ditch clients
This commit is contained in:
@@ -14,6 +14,12 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
const wss = new WebSocket.Server({ server });
|
const wss = new WebSocket.Server({ server });
|
||||||
|
|
||||||
|
function noop() { }
|
||||||
|
|
||||||
|
function heartbeat() {
|
||||||
|
this.isAlive = true;
|
||||||
|
}
|
||||||
|
|
||||||
wss.on('connection', function connection(ws) {
|
wss.on('connection', function connection(ws) {
|
||||||
ws.isAlive = true;
|
ws.isAlive = true;
|
||||||
|
|
||||||
@@ -58,11 +64,6 @@ module.exports = {
|
|||||||
// ws.send('something');
|
// ws.send('something');
|
||||||
});
|
});
|
||||||
|
|
||||||
function noop() { }
|
|
||||||
|
|
||||||
function heartbeat() {
|
|
||||||
this.isAlive = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const interval = setInterval(function ping() {
|
const interval = setInterval(function ping() {
|
||||||
wss.clients.forEach(function each(ws) {
|
wss.clients.forEach(function each(ws) {
|
||||||
|
|||||||
Reference in New Issue
Block a user