summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt Cotter <matt.cotter@mongodb.com>2016-09-07 17:19:28 -0400
committerMatt Cotter <matt.cotter@mongodb.com>2016-09-08 17:50:21 -0400
commitf0df1d05b6098bfc01d0351e6867f044542d3b39 (patch)
treeeca17b9ae1ae433a457bfe71ab90309ff12ff897 /src
parent96670e2928a7ae6de7104d9bc1f4bff921b3fb90 (diff)
downloadmongo-f0df1d05b6098bfc01d0351e6867f044542d3b39.tar.gz
SERVER-26012 pass SOMAXCONN to calls to listen
Diffstat (limited to 'src')
-rw-r--r--src/mongo/executor/network_interface_asio_integration_test.cpp2
-rw-r--r--src/mongo/util/net/listen.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/executor/network_interface_asio_integration_test.cpp b/src/mongo/executor/network_interface_asio_integration_test.cpp
index 24472301bdb..7a39a589673 100644
--- a/src/mongo/executor/network_interface_asio_integration_test.cpp
+++ b/src/mongo/executor/network_interface_asio_integration_test.cpp
@@ -246,7 +246,6 @@ private:
bool _cancel;
};
-#ifndef _WIN32
TEST_F(NetworkInterfaceASIOIntegrationTest, StressTest) {
constexpr std::size_t numOps = 10000;
RemoteCommandResponse testResults[numOps];
@@ -298,7 +297,6 @@ TEST_F(NetworkInterfaceASIOIntegrationTest, StressTest) {
ASSERT_EQ(ec, expectedResults[i]);
}
}
-#endif
// Hook that intentionally never finishes
class HangingHook : public executor::NetworkConnectionHook {
diff --git a/src/mongo/util/net/listen.cpp b/src/mongo/util/net/listen.cpp
index ce59b7896a4..1842a091b41 100644
--- a/src/mongo/util/net/listen.cpp
+++ b/src/mongo/util/net/listen.cpp
@@ -247,7 +247,7 @@ void Listener::initAndListen() {
SOCKET maxfd = 0; // needed for select()
for (unsigned i = 0; i < _socks.size(); i++) {
- if (::listen(_socks[i], 128) != 0) {
+ if (::listen(_socks[i], SOMAXCONN) != 0) {
error() << "listen(): listen() failed " << errnoWithDescription();
return;
}
@@ -423,7 +423,7 @@ void Listener::initAndListen() {
}
for (unsigned i = 0; i < _socks.size(); i++) {
- if (::listen(_socks[i], 128) != 0) {
+ if (::listen(_socks[i], SOMAXCONN) != 0) {
error() << "listen(): listen() failed " << errnoWithDescription();
return;
}