core: fix pollfds hup check loop

This commit is contained in:
Vaxry 2023-10-14 11:56:42 +01:00
parent 60af24a70d
commit d8daa2a84f

View file

@ -323,7 +323,7 @@ void CPortalManager::startEventLoop() {
} }
for (size_t i = 0; i < 3; ++i) { for (size_t i = 0; i < 3; ++i) {
if (pollfds[0].revents & POLLHUP) { if (pollfds[i].revents & POLLHUP) {
Debug::log(CRIT, "[core] Disconnected from pollfd id {}", i); Debug::log(CRIT, "[core] Disconnected from pollfd id {}", i);
g_pPortalManager->terminate(); g_pPortalManager->terminate();
} }