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() {
|
void GeneralClientConnection::disconnect() {
|
||||||
if (isConnected()) {
|
if (isConnected()) {
|
||||||
disconnectSocket();
|
disconnectSocket();
|
||||||
|
_numConnectRetries = 0;
|
||||||
|
_isConnected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_isConnected = false;
|
|
||||||
_numConnectRetries = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -179,7 +179,7 @@ SimpleHttpResult* SimpleHttpClient::retryRequest(
|
||||||
<< "" << _params._retryMessage << " - no retries left";
|
<< "" << _params._retryMessage << " - no retries left";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (application_features::ApplicationServer::isStopping()) {
|
if (application_features::ApplicationServer::isStopping()) {
|
||||||
// abort this client, will also lead to exiting this loop next
|
// abort this client, will also lead to exiting this loop next
|
||||||
setAborted(true);
|
setAborted(true);
|
||||||
|
@ -404,6 +404,11 @@ SimpleHttpResult* SimpleHttpClient::doRequest(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( application_features::ApplicationServer::isStopping()) {
|
||||||
|
setErrorMessage("Command locally aborted");
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
remainingTime = endTime - TRI_microtime();
|
remainingTime = endTime - TRI_microtime();
|
||||||
if (isAborted()) {
|
if (isAborted()) {
|
||||||
setErrorMessage("Client request aborted");
|
setErrorMessage("Client request aborted");
|
||||||
|
|
Loading…
Reference in New Issue