mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
feat: implement naive client ping
This commit is contained in:
committed by
Carlos Valente
parent
d87542dcf7
commit
8dd448db44
@@ -100,6 +100,16 @@ export class SocketServer implements IAdapter {
|
||||
const message = JSON.parse(data);
|
||||
const { type, payload } = message;
|
||||
|
||||
if (type === 'ping') {
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
type: 'pong',
|
||||
payload,
|
||||
}),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type === 'get-client-name') {
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
|
||||
@@ -188,6 +188,7 @@ export const startServer = async (
|
||||
direction: SimpleDirection.CountDown,
|
||||
},
|
||||
frozen: false,
|
||||
ping: -1,
|
||||
});
|
||||
|
||||
// initialise logging service, escalateErrorFn is only exists in electron
|
||||
|
||||
Reference in New Issue
Block a user