mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
admin
This commit is contained in:
@@ -64,6 +64,15 @@ managerEvents.on('lock', ({ roverId, locked }) => {
|
||||
syncAll();
|
||||
});
|
||||
|
||||
managerEvents.on('driver', ({ socketId }) => {
|
||||
if (!socketId) return;
|
||||
const socket = io.sockets.sockets.get(socketId);
|
||||
if (socket) {
|
||||
logger.info('Driver assignment change; syncing session', socketId);
|
||||
syncSocket(socket);
|
||||
}
|
||||
});
|
||||
|
||||
turnEvents.on('activeDriver', () => {
|
||||
logger.info('Active driver change; syncing all clients');
|
||||
syncAll();
|
||||
|
||||
Reference in New Issue
Block a user