From: Jake Farrell Date: Fri, 27 Jan 2012 04:32:17 +0000 (+0000) Subject: Thrift-1502:TSimpleServer::serve(): Do not print out error message if server was... X-Git-Tag: 0.9.1~454 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=6ce2704a14bb109d2d9e29d1b77974f57b2e8636;p=common%2Fthrift.git Thrift-1502:TSimpleServer::serve(): Do not print out error message if server was stopped. Client: cpp Patch: Vibhav Sreekanti Print msg on TSimpleServer stop. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1236523 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/server/TSimpleServer.cpp b/lib/cpp/src/server/TSimpleServer.cpp index b13b9767..5def0e42 100644 --- a/lib/cpp/src/server/TSimpleServer.cpp +++ b/lib/cpp/src/server/TSimpleServer.cpp @@ -68,8 +68,10 @@ void TSimpleServer::serve() { if (inputTransport != NULL) { inputTransport->close(); } if (outputTransport != NULL) { outputTransport->close(); } if (client != NULL) { client->close(); } - string errStr = string("TServerTransport died on accept: ") + ttx.what(); - GlobalOutput(errStr.c_str()); + if (!stop_ || ttx.getType() != TTransportException::INTERRUPTED) { + string errStr = string("TServerTransport died on accept: ") + ttx.what(); + GlobalOutput(errStr.c_str()); + } continue; } catch (TException& tx) { if (inputTransport != NULL) { inputTransport->close(); }