Система авторизации устройств пользователя

This commit is contained in:
RoyceDa
2026-02-09 04:13:32 +02:00
parent 7232fcb903
commit 193640f46a
21 changed files with 753 additions and 32 deletions

View File

@@ -60,11 +60,14 @@ public class Server extends WebSocketServer {
return;
}
Client client = socket.getAttachment();
this.listener.onClientDisconnect(this, client);
/**
* Удаляем клиента из индексации (потому что он вышел)
*/
this.clientIndexer.removeClientFromIndex(client);
/**
* Вызываем событие отключения клиента
*/
this.listener.onClientDisconnect(this, client);
}
@Override
@@ -232,6 +235,11 @@ public class Server extends WebSocketServer {
* Останавливаем сервер при завершении работы и вызываем слушатели остановки сервера.
*/
this.listener.onServerStop(this);
try {
this.stop();
} catch (InterruptedException e) {
e.printStackTrace();
}
}));
}
}