Detect closed connections.

This commit is contained in:
Michael Jumper
2010-09-07 23:32:38 -07:00
parent 8f4d722a9c
commit 5bcea85d81
5 changed files with 41 additions and 35 deletions

View File

@@ -227,6 +227,9 @@ int guac_select(GUACIO* io, int usec_timeout) {
fd_set fds;
struct timeval timeout;
if (usec_timeout < 0)
return select(io->fd + 1, &fds, NULL, NULL, NULL);
timeout.tv_sec = usec_timeout/1000000;
timeout.tv_usec = usec_timeout%1000000;