AudioServer: Handle client data before disconnecting clients

This commit is contained in:
Bananymous 2026-03-23 20:41:13 +02:00
parent 81d5c86a7a
commit 35e2a70de0
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ int main()
const int client_fd = events[i].data.fd; const int client_fd = events[i].data.fd;
if (events[i].events & EPOLLHUP) if ((events[i].events & EPOLLHUP) && !(events[i].events & EPOLLIN))
{ {
audio_server->on_client_disconnect(client_fd); audio_server->on_client_disconnect(client_fd);
epoll_ctl(epoll_fd, EPOLL_CTL_DEL, client_fd, nullptr); epoll_ctl(epoll_fd, EPOLL_CTL_DEL, client_fd, nullptr);