We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a60cf9 commit 567b0daCopy full SHA for 567b0da
src/robust_provider/subscription.rs
@@ -109,15 +109,13 @@ impl<N: Network> RobustSubscription<N> {
109
loop {
110
let recv_result = timeout(subscription_timeout, self.subscription.recv()).await;
111
match recv_result {
112
- Ok(recv_result) => match recv_result {
113
- Ok(header) => {
114
- if self.is_on_fallback() {
115
- self.try_reconnect_to_primary(false).await;
116
- }
117
- return Ok(header);
+ Ok(Ok(header)) => {
+ if self.is_on_fallback() {
+ self.try_reconnect_to_primary(false).await;
118
}
119
- Err(recv_error) => return Err(recv_error.into()),
120
- },
+ return Ok(header);
+ }
+ Ok(Err(recv_error)) => return Err(recv_error.into()),
121
Err(_) => {
122
warn!(
123
timeout_secs = subscription_timeout.as_secs(),
0 commit comments