Fix comment style and be a bit more verbose

... explaining cedae6e6f9.
pull/3/head
Christian Beier 6 years ago
parent ffa449ad01
commit 14c24e2bcc
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8

@ -566,7 +566,7 @@ clientInput(void *data)
if (FD_ISSET(cl->pipe_notify_client_thread[0], &rfds))
{
// Reset the pipe
/* Reset the pipe */
char buf;
while (read(cl->pipe_notify_client_thread[0], &buf, sizeof(buf)) == sizeof(buf));
}
@ -1112,8 +1112,13 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
}
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
// Notify the thread and join it
/*
Notify the thread. This simply writes a NULL byte to the notify pipe in order to get past the select()
in clientInput(), the loop in there will then break because the rfbCloseClient() above has set
currentCl->sock to -1.
*/
write(currentCl->pipe_notify_client_thread[1], "\x00", 1);
/* And wait for it to finish. */
pthread_join(currentCl->client_thread, NULL);
#else
rfbClientConnectionGone(currentCl);

Loading…
Cancel
Save