server: remove application level websocket ping

Changelog: Removed
This commit is contained in:
Johann150 2023-02-03 11:48:46 +01:00
parent 30c26abde7
commit ca257d7d0c
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -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');
}
});
}); });
}); });
}; };