diff options
Diffstat (limited to 'libvncclient')
-rw-r--r-- | libvncclient/sockets.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libvncclient/sockets.c b/libvncclient/sockets.c index 4183192..6c8cec1 100644 --- a/libvncclient/sockets.c +++ b/libvncclient/sockets.c @@ -150,14 +150,10 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n) errno=WSAGetLastError(); #endif if (errno == EWOULDBLOCK || errno == EAGAIN) { -#ifndef WIN32 - usleep (10000); -#else - Sleep (10); -#endif /* TODO: ProcessXtEvents(); */ + WaitForMessage(client, 100000); i = 0; } else { rfbClientErr("read (%d: %s)\n",errno,strerror(errno)); @@ -196,14 +192,10 @@ ReadFromRFBServer(rfbClient* client, char *out, unsigned int n) errno=WSAGetLastError(); #endif if (errno == EWOULDBLOCK || errno == EAGAIN) { -#ifndef WIN32 - usleep (10000); -#else - Sleep (10); -#endif /* TODO: ProcessXtEvents(); */ + WaitForMessage(client, 100000); i = 0; } else { rfbClientErr("read (%s)\n",strerror(errno)); |