--- sourceforge.net/trunk/rdesktop/rdpdr.c 2004/04/16 13:03:13 661 +++ sourceforge.net/trunk/rdesktop/rdpdr.c 2004/04/16 14:04:02 662 @@ -809,11 +809,13 @@ { uint32 select_timeout = 0; // Timeout value to be used for select() (in millisecons). struct async_iorequest *iorq; + char c; iorq = g_iorequest; while (iorq != NULL) { - if (iorq->fd != 0) + /* We need to test that the fd is still valid */ + if ((iorq->fd != 0) && (read(iorq->fd, &c, 0) == 0)) { switch (iorq->major) {