1
0
Fork 0

Reset retry counter only when previously connected in order to not disable the retry check. (#6737)

Abort the doRequest loop when in shutdown.
This commit is contained in:
Lars Maier 2018-10-05 17:10:44 +02:00 committed by Max Neunhöffer
parent 26c0c7be67
commit 090024daed
2 changed files with 8 additions and 4 deletions

View File

@ -158,10 +158,9 @@ bool GeneralClientConnection::connect() {
void GeneralClientConnection::disconnect() {
if (isConnected()) {
disconnectSocket();
_numConnectRetries = 0;
_isConnected = false;
}
_isConnected = false;
_numConnectRetries = 0;
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -179,7 +179,7 @@ SimpleHttpResult* SimpleHttpClient::retryRequest(
<< "" << _params._retryMessage << " - no retries left";
break;
}
if (application_features::ApplicationServer::isStopping()) {
// abort this client, will also lead to exiting this loop next
setAborted(true);
@ -404,6 +404,11 @@ SimpleHttpResult* SimpleHttpClient::doRequest(
break;
}
if ( application_features::ApplicationServer::isStopping()) {
setErrorMessage("Command locally aborted");
return nullptr;
}
remainingTime = endTime - TRI_microtime();
if (isAborted()) {
setErrorMessage("Client request aborted");