Skip to content

Commit 72a7168

Browse files
committed
fix
1 parent 8b2b09c commit 72a7168

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/manager.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ impl Manager {
252252

253253
let result = tokio::time::timeout(timeout, client.quorum(request)).await;
254254

255-
let sleep_time;
255+
let mut sleep_time = 100;
256256
match result {
257257
Ok(Ok(response)) => {
258258
return Ok(response);
@@ -273,7 +273,6 @@ impl Manager {
273273
"lighthouse quorum timeout. error: {}",
274274
e.to_string()
275275
);
276-
sleep_time = 100;
277276
}
278277
}
279278

@@ -284,7 +283,7 @@ impl Manager {
284283
)));
285284
}
286285

287-
tokio::time::sleep(timeout).await;
286+
tokio::time::sleep(tokio::time::Duration::from_millis(sleep_time)).await;
288287

289288
// Reset the client since the lighthouse server might have failed
290289
// If this also fails, consider increasing `connect_timeout`.

0 commit comments

Comments
 (0)