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 1f829a5..f4d4704 100644
--- a/lib/cpp/src/thrift/transport/TPipeServer.cpp
+++ b/lib/cpp/src/thrift/transport/TPipeServer.cpp
@@ -53,11 +53,11 @@
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;