diff --git a/src/eckit/net/SocketOptions.cc b/src/eckit/net/SocketOptions.cc index 85338d2fa..530ecf170 100644 --- a/src/eckit/net/SocketOptions.cc +++ b/src/eckit/net/SocketOptions.cc @@ -9,6 +9,7 @@ */ #include +#include #include "eckit/config/Resource.h" #include "eckit/net/SocketOptions.h" @@ -16,13 +17,9 @@ namespace eckit::net { static void init(SocketOptions& opts) { - static std::string bindAddr = Resource("localBindingAddress", ""); /* "127.0.0.1" */ - - opts.bindAddress(bindAddr); - - static int ListenBacklog = eckit::Resource("socketOptionsListenBacklog", 5); - opts.listenBacklog(ListenBacklog); + static std::string bindAddr = Resource("localBindingAddress", ""); /* "127.0.0.1" */ + static int ListenBacklog = eckit::Resource("socketOptionsListenBacklog", SOMAXCONN); static bool reusePort = eckit::Resource("socketOptionsReusePort", false); static bool reuseAddr = eckit::Resource("socketOptionsReuseAddr", false); @@ -34,6 +31,8 @@ static void init(SocketOptions& opts) { static int receiveBufferSize = eckit::Resource("socketOptionsReceiveBufferSize", 0); static int sendBufferSize = eckit::Resource("socketOptionsSendBufferSize", 0); + opts.bindAddress(bindAddr); + opts.listenBacklog(ListenBacklog); opts.reusePort(reusePort); opts.reuseAddr(reuseAddr); opts.noLinger(noLinger);