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

View file

@ -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;