Merge pull request #1073 from tobiasblass/fix_recvmsg_endless_loop

FIX: Suprocess loops endlessly when the control socket closes.
master
Scott Anderson 7 years ago committed by GitHub
commit df876a7cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -130,7 +130,7 @@ static void communicate(int sock) {
int drm_fd = -1; int drm_fd = -1;
bool running = true; bool running = true;
while (running && recv_msg(sock, &drm_fd, &msg, sizeof(msg)) >= 0) { while (running && recv_msg(sock, &drm_fd, &msg, sizeof(msg)) > 0) {
switch (msg.type) { switch (msg.type) {
case MSG_OPEN: case MSG_OPEN:
errno = 0; errno = 0;

Loading…
Cancel
Save