Commit a5f8d3a3 authored by Christian Beier's avatar Christian Beier

libvncserver: fix endless loop when server closed client in threaded mode.

Signed-off-by: 's avatarChristian Beier <dontmind@freeshell.org>
parent 079394ca
......@@ -517,6 +517,11 @@ clientInput(void *data)
struct timeval tv;
int n;
if (cl->sock == -1) {
/* Client has disconnected. */
break;
}
FD_ZERO(&rfds);
FD_SET(cl->sock, &rfds);
FD_ZERO(&efds);
......@@ -546,11 +551,6 @@ clientInput(void *data)
if (FD_ISSET(cl->sock, &rfds) || FD_ISSET(cl->sock, &efds))
rfbProcessClientMessage(cl);
if (cl->sock == -1) {
/* Client has disconnected. */
break;
}
}
/* Get rid of the output thread. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment