THRIFT-1716 max allowed connections should be PIPE_UNLIMITED_INSTANCES
authorRoger Meier <roger@apache.org>
Tue, 9 Oct 2012 18:46:55 +0000 (18:46 +0000)
committerRoger Meier <roger@apache.org>
Tue, 9 Oct 2012 18:46:55 +0000 (18:46 +0000)
Patch: Jens Geyer

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1396190 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/thrift/transport/TPipeServer.cpp

index 1f829a5..f4d4704 100644 (file)
@@ -53,11 +53,11 @@ TPipeServer::TPipeServer(const std::string &pipename, uint32_t bufsize, uint32_t
   bufsize_(bufsize),
   Pipe_(INVALID_HANDLE_VALUE),
   isAnonymous(false)
- {  //Restrict maxconns_ to 1-255
+ {  //Restrict maxconns_ to 1-PIPE_UNLIMITED_INSTANCES
     if(maxconnections == 0)
       maxconns_ = 1;
-    else if (maxconnections > 255)
-      maxconns_ = 255;
+    else if (maxconnections > PIPE_UNLIMITED_INSTANCES)
+      maxconns_ = PIPE_UNLIMITED_INSTANCES;
        else
       maxconns_ = maxconnections;