Merge pull request #1073 from tobiasblass/fix_recvmsg_endless_loop

FIX: Suprocess loops endlessly when the control socket closes.
This commit is contained in:
Scott Anderson 2018-06-21 08:18:37 +12:00 committed by GitHub
commit df876a7cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ static void communicate(int sock) {
int drm_fd = -1;
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) {
case MSG_OPEN:
errno = 0;