Commit 6c8d568f authored by unknown's avatar unknown

ndb - bug#17150

  ndb_mgmd limited no of api nodes, by restricting no of mgmsessions
  (these are used for dynamic port allocation)


ndb/include/util/SocketServer.hpp:
  Increase default max session to ~0
ndb/src/common/util/SocketServer.cpp:
  Increase default max session to ~0
parent 17741f9c
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
/** /**
* Constructor / Destructor * Constructor / Destructor
*/ */
SocketServer(int maxSessions = 32); SocketServer(unsigned maxSessions = ~(unsigned)0);
~SocketServer(); ~SocketServer();
/** /**
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define DEBUG(x) ndbout << x << endl; #define DEBUG(x) ndbout << x << endl;
SocketServer::SocketServer(int maxSessions) : SocketServer::SocketServer(unsigned maxSessions) :
m_sessions(10), m_sessions(10),
m_services(5) m_services(5)
{ {
...@@ -124,7 +124,7 @@ SocketServer::setup(SocketServer::Service * service, ...@@ -124,7 +124,7 @@ SocketServer::setup(SocketServer::Service * service,
DBUG_RETURN(false); DBUG_RETURN(false);
} }
if (listen(sock, m_maxSessions) == -1){ if (listen(sock, m_maxSessions > 32 ? 32 : m_maxSessions) == -1){
DBUG_PRINT("error",("listen() - %d - %s", DBUG_PRINT("error",("listen() - %d - %s",
errno, strerror(errno))); errno, strerror(errno)));
NDB_CLOSE_SOCKET(sock); NDB_CLOSE_SOCKET(sock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment