File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -198,13 +198,17 @@ async fn validator_tick<A: Adapter + 'static>(
198
198
199
199
match channel. spec . validators . find ( & whoami) {
200
200
SpecValidator :: Leader ( _) => {
201
- if let Err ( e) = timeout ( duration, leader:: tick ( & sentry) ) . await {
202
- return Err ( ValidatorWorkerError :: Failed ( e. to_string ( ) ) ) ;
201
+ match timeout ( duration, leader:: tick ( & sentry) ) . await {
202
+ Err ( e) => return Err ( ValidatorWorkerError :: Failed ( e. to_string ( ) ) ) ,
203
+ Ok ( Err ( e) ) => return Err ( ValidatorWorkerError :: Failed ( e. to_string ( ) ) ) ,
204
+ _ => ( )
203
205
}
204
206
}
205
207
SpecValidator :: Follower ( _) => {
206
- if let Err ( e) = timeout ( duration, follower:: tick ( & sentry) ) . await {
207
- return Err ( ValidatorWorkerError :: Failed ( e. to_string ( ) ) ) ;
208
+ match timeout ( duration, follower:: tick ( & sentry) ) . await {
209
+ Err ( e) => return Err ( ValidatorWorkerError :: Failed ( e. to_string ( ) ) ) ,
210
+ Ok ( Err ( e) ) => return Err ( ValidatorWorkerError :: Failed ( e. to_string ( ) ) ) ,
211
+ _ => ( )
208
212
}
209
213
}
210
214
SpecValidator :: None => {
You can’t perform that action at this time.
0 commit comments