From 6ce2704a14bb109d2d9e29d1b77974f57b2e8636 Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Fri, 27 Jan 2012 04:32:17 +0000 Subject: [PATCH] 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 --- lib/cpp/src/server/TSimpleServer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } -- 2.17.1