You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2016/11/10 21:01:29 UTC
thrift git commit: THRIFT-3957 TConnectedClient does not disconnect
from clients when the receive timeout is reached. Client: C++ Patch: Claudius
Heine
Repository: thrift
Updated Branches:
refs/heads/master 74c99ba38 -> f793c2b3a
THRIFT-3957 TConnectedClient does not disconnect from clients when the receive timeout is reached.
Client: C++
Patch: Claudius Heine <ch...@denx.de>
This closes #1122
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/f793c2b3
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/f793c2b3
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/f793c2b3
Branch: refs/heads/master
Commit: f793c2b3aab06af37b59a7fd96ef22c339a7b957
Parents: 74c99ba
Author: Jim King <jk...@apache.org>
Authored: Thu Nov 10 15:08:21 2016 -0500
Committer: Jim King <jk...@apache.org>
Committed: Thu Nov 10 15:08:21 2016 -0500
----------------------------------------------------------------------
lib/cpp/src/thrift/server/TConnectedClient.cpp | 34 ++++++++++-----------
1 file changed, 16 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/f793c2b3/lib/cpp/src/thrift/server/TConnectedClient.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/server/TConnectedClient.cpp b/lib/cpp/src/thrift/server/TConnectedClient.cpp
index c248e63..9583284 100644
--- a/lib/cpp/src/thrift/server/TConnectedClient.cpp
+++ b/lib/cpp/src/thrift/server/TConnectedClient.cpp
@@ -64,24 +64,22 @@ void TConnectedClient::run() {
}
} catch (const TTransportException& ttx) {
switch (ttx.getType()) {
- case TTransportException::TIMED_OUT:
- // Receive timeout - continue processing.
- continue;
-
- case TTransportException::END_OF_FILE:
- case TTransportException::INTERRUPTED:
- // Client disconnected or was interrupted. No logging needed. Done.
- done = true;
- break;
-
- default: {
- // All other transport exceptions are logged.
- // State of connection is unknown. Done.
- string errStr = string("TConnectedClient died: ") + ttx.what();
- GlobalOutput(errStr.c_str());
- done = true;
- break;
- }
+ case TTransportException::END_OF_FILE:
+ case TTransportException::INTERRUPTED:
+ case TTransportException::TIMED_OUT:
+ // Client disconnected or was interrupted or did not respond within the receive timeout.
+ // No logging needed. Done.
+ done = true;
+ break;
+
+ default: {
+ // All other transport exceptions are logged.
+ // State of connection is unknown. Done.
+ string errStr = string("TConnectedClient died: ") + ttx.what();
+ GlobalOutput(errStr.c_str());
+ done = true;
+ break;
+ }
}
} catch (const TException& tex) {
string errStr = string("TConnectedClient processing exception: ") + tex.what();