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
This commit is contained in:
Jim King 2016-11-10 15:08:21 -05:00
parent 74c99ba38b
commit f793c2b3aa

View File

@ -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:
case TTransportException::TIMED_OUT:
// Client disconnected or was interrupted or did not respond within the receive timeout.
// No logging needed. Done.
done = true;
break;
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;
}
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();