mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
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:
parent
74c99ba38b
commit
f793c2b3aa
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user