From: Roger Meier Date: Tue, 9 Oct 2012 18:46:55 +0000 (+0000) Subject: THRIFT-1716 max allowed connections should be PIPE_UNLIMITED_INSTANCES X-Git-Tag: 0.9.1~276 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=271e47a74debf3e504f3ee317c135e0453e3841b;p=common%2Fthrift.git THRIFT-1716 max allowed connections should be PIPE_UNLIMITED_INSTANCES Patch: Jens Geyer git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1396190 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/thrift/transport/TPipeServer.cpp b/lib/cpp/src/thrift/transport/TPipeServer.cpp index 1f829a5e..f4d47048 100644 --- a/lib/cpp/src/thrift/transport/TPipeServer.cpp +++ b/lib/cpp/src/thrift/transport/TPipeServer.cpp @@ -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;