Fix race problem with detecting listening inetd sockets
The previous detection would fail if the socket closed before we
had time to inspect it, which got us stuck in a loop as we would
try (and fail) to do accept() on a non-listening socket.
diff --git a/common/network/TcpSocket.h b/common/network/TcpSocket.h
index 02f04c9..a97e683 100644
--- a/common/network/TcpSocket.h
+++ b/common/network/TcpSocket.h
@@ -65,8 +65,7 @@
static bool enableNagles(int sock, bool enable);
static bool cork(int sock, bool enable);
- static bool isSocket(int sock);
- static bool isConnected(int sock);
+ static bool isListening(int sock);
static int getSockPort(int sock);
private:
bool closeFd;