diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs index 904b62ffcd5..83081ed26db 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tarpc_csp_vault_client.rs @@ -269,17 +269,12 @@ impl BasicSignatureCspVault for RemoteCspVault { message: Vec, key_id: KeyId, ) -> Result { - let c = self.tarpc_csp_client.clone(); - let t = self.rpc_timeout.clone(); - self.tokio_block_on(async move { - c.sign( - context_with_timeout(t), - algorithm_id, - ByteBuf::from(message), - key_id, - ) - .await - }) + self.tokio_block_on(self.tarpc_csp_client.sign( + context_with_timeout(self.rpc_timeout), + algorithm_id, + ByteBuf::from(message), + key_id, + )) .unwrap_or_else(|rpc_error: tarpc::client::RpcError| { Err(CspBasicSignatureError::TransientInternalError { internal_error: rpc_error.to_string(),