Do not check error code if select returns 0
Summary: They don't seem to be guaranteed on our system, 0 just means timeout
Reviewed By: karl
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665040 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TServerSocket.cpp b/lib/cpp/src/transport/TServerSocket.cpp
index 448898a..2393134 100644
--- a/lib/cpp/src/transport/TServerSocket.cpp
+++ b/lib/cpp/src/transport/TServerSocket.cpp
@@ -148,13 +148,13 @@
interrupt_ = false;
if (ret > 0) {
+ // Cool, ready to accept
break;
} else if (ret == 0) {
- if (errno != EINTR && errno != EAGAIN) {
- perror("TServerSocket::select() errcode");
- throw TTransportException(TTransportException::UNKNOWN);
- }
+ // Timed out... keep going
+ continue;
} else {
+ // Bogus, select messed up
perror("TServerSocket::select() negret");
throw TTransportException(TTransportException::UNKNOWN);
}