ndb - bug#17150

ndb_mgmd limited no of api nodes, by restricting no of mgmsessions
  (these are used for dynamic port allocation)
This commit is contained in:
jonas@perch.ndb.mysql.com 2006-04-26 14:53:43 +02:00
parent a23944b988
commit 93a21814c0
2 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ public:
/**
* Constructor / Destructor
*/
SocketServer(int maxSessions = 32);
SocketServer(unsigned maxSessions = ~(unsigned)0);
~SocketServer();
/**

View File

@ -27,7 +27,7 @@
#define DEBUG(x) ndbout << x << endl;
SocketServer::SocketServer(int maxSessions) :
SocketServer::SocketServer(unsigned maxSessions) :
m_sessions(10),
m_services(5)
{
@ -124,7 +124,7 @@ SocketServer::setup(SocketServer::Service * service,
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",
errno, strerror(errno)));
NDB_CLOSE_SOCKET(sock);