-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In these parts of the code we returning before adding the latest error to the errors: Vec<_>. This causes this code to return AllAttemptsErrored([]) which is a bit frustrating.
rust-electrum-client/src/client.rs
Lines 56 to 65 in 761796c
| let failed_attempts = errors.len() + 1; | |
| if retries_exhausted(failed_attempts, $self.config.retry()) { | |
| warn!("call '{}' failed after {} attempts", stringify!($name), failed_attempts); | |
| return Err(Error::AllAttemptsErrored(errors)); | |
| } | |
| warn!("call '{}' failed with {}, retry: {}/{}", stringify!($name), e, failed_attempts, $self.config.retry()); | |
| errors.push(e); |
rust-electrum-client/src/client.rs
Lines 80 to 89 in 761796c
| let failed_attempts = errors.len() + 1; | |
| if retries_exhausted(failed_attempts, $self.config.retry()) { | |
| warn!("re-creating client failed after {} attempts", failed_attempts); | |
| return Err(Error::AllAttemptsErrored(errors)); | |
| } | |
| warn!("re-creating client failed with {}, retry: {}/{}", e, failed_attempts, $self.config.retry()); | |
| errors.push(e); |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working