Skip to content

Commit

Permalink
plugin: Fix high CPU usage after disconnecting unresponsive client
Browse files Browse the repository at this point in the history
Closes #180
  • Loading branch information
nowrep committed Nov 9, 2023
1 parent 1c8aeea commit ff00d81
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/vkcapture.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,12 @@ static void *server_thread_run(void *data)
continue;
}

if (server_has_event_on_fd(server.eventfd) && server.quit) {
break;
if (server_has_event_on_fd(server.eventfd)) {
uint64_t q;
read(server.eventfd, &q, sizeof(q));
if (server.quit) {
break;
}
}

if (server_has_event_on_fd(sockfd)) {
Expand Down

0 comments on commit ff00d81

Please sign in to comment.