From b5c01bcdfe138dfc56a25c63357727f0bfe38ec6 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 22 Oct 2024 12:12:05 +0700 Subject: [PATCH] fix(sdk): opposite retry trigger --- packages/rs-dapi-client/src/dapi_client.rs | 2 +- packages/rs-dapi-client/src/transport/grpc.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rs-dapi-client/src/dapi_client.rs b/packages/rs-dapi-client/src/dapi_client.rs index 468ca39974..b352cba2c1 100644 --- a/packages/rs-dapi-client/src/dapi_client.rs +++ b/packages/rs-dapi-client/src/dapi_client.rs @@ -233,7 +233,7 @@ impl DapiRequestExecutor for DapiClient { tracing::trace!(?response, "received {} response", response_name); } Err(error) => { - if !error.can_retry() { + if error.can_retry() { if applied_settings.ban_failed_address { let mut address_list = self .address_list diff --git a/packages/rs-dapi-client/src/transport/grpc.rs b/packages/rs-dapi-client/src/transport/grpc.rs index e32d6c70f0..fc98d63296 100644 --- a/packages/rs-dapi-client/src/transport/grpc.rs +++ b/packages/rs-dapi-client/src/transport/grpc.rs @@ -122,7 +122,7 @@ impl CanRetry for dapi_grpc::tonic::Status { use dapi_grpc::tonic::Code::*; - !matches!( + matches!( code, Ok | DataLoss | Cancelled