summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-04-26 16:53:26 +0200
committerunknown <jonas@perch.ndb.mysql.com>2006-04-26 16:53:26 +0200
commit45aaa5497831d489896331bd97bf2144e7a27f5d (patch)
treeef1f30d480276091bbf336e3c6492756b31c19f1 /ndb
parent6dd5c2902598431162474992b4aa96d814994b3d (diff)
parent4191b8a39f646f0ea70934c4844f915ac74f36c1 (diff)
downloadmariadb-git-45aaa5497831d489896331bd97bf2144e7a27f5d.tar.gz
Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
Diffstat (limited to 'ndb')
-rw-r--r--ndb/include/util/SocketServer.hpp2
-rw-r--r--ndb/src/common/util/SocketServer.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/ndb/include/util/SocketServer.hpp b/ndb/include/util/SocketServer.hpp
index ee2dd31c41f..02a0a6b5d92 100644
--- a/ndb/include/util/SocketServer.hpp
+++ b/ndb/include/util/SocketServer.hpp
@@ -74,7 +74,7 @@ public:
/**
* Constructor / Destructor
*/
- SocketServer(int maxSessions = 32);
+ SocketServer(unsigned maxSessions = ~(unsigned)0);
~SocketServer();
/**
diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp
index db5c03f925a..755764c7700 100644
--- a/ndb/src/common/util/SocketServer.cpp
+++ b/ndb/src/common/util/SocketServer.cpp
@@ -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);