mirror of https://gitee.com/bigwinds/arangodb
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:
parent
26c0c7be67
commit
090024daed
|
@ -158,10 +158,9 @@ bool GeneralClientConnection::connect() {
|
|||
void GeneralClientConnection::disconnect() {
|
||||
if (isConnected()) {
|
||||
disconnectSocket();
|
||||
_numConnectRetries = 0;
|
||||
_isConnected = false;
|
||||
}
|
||||
|
||||
_isConnected = false;
|
||||
_numConnectRetries = 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue