summaryrefslogtreecommitdiff
path: root/server/src/tcpsocket.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/tcpsocket.cc')
-rw-r--r--server/src/tcpsocket.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/tcpsocket.cc b/server/src/tcpsocket.cc
index 90f71a5..d361b7b 100644
--- a/server/src/tcpsocket.cc
+++ b/server/src/tcpsocket.cc
@@ -230,7 +230,7 @@ int TCPSocket::read(char *buf, int size)
// Wait until something is ready to be read ( peek'a'loop ).
errno = EAGAIN;
while( recv(sock, buf, 1, MSG_PEEK) == -1 && errno == EAGAIN) {
- sleep(1);
+ usleep(10);
}
// Now read it
@@ -238,6 +238,8 @@ int TCPSocket::read(char *buf, int size)
throw TCPReadException(strerror(errno));
}
+ // fwrite(buf, size, 1, stdout); fflush(stdout);
+
return res;
}