AudioServer: Handle client data before disconnecting clients
This commit is contained in:
parent
81d5c86a7a
commit
35e2a70de0
|
|
@ -194,7 +194,7 @@ int main()
|
|||
|
||||
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);
|
||||
epoll_ctl(epoll_fd, EPOLL_CTL_DEL, client_fd, nullptr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue