forked from FoundKeyGang/FoundKey
server: remove application level websocket ping
Changelog: Removed
This commit is contained in:
parent
30c26abde7
commit
ca257d7d0c
1 changed files with 0 additions and 8 deletions
|
@ -76,14 +76,6 @@ export const initializeStreamingServer = (server: http.Server): void => {
|
||||||
if (intervalId) clearInterval(intervalId);
|
if (intervalId) clearInterval(intervalId);
|
||||||
if (pingTimeout) clearTimeout(pingTimeout);
|
if (pingTimeout) clearTimeout(pingTimeout);
|
||||||
});
|
});
|
||||||
|
|
||||||
// ping/pong mechanism
|
|
||||||
// TODO: the websocket protocol already specifies a ping/pong mechanism, why is this necessary?
|
|
||||||
socket.on('message', async (data) => {
|
|
||||||
if (data.type === 'utf8' && data.utf8Data === 'ping') {
|
|
||||||
socket.send('pong');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue