check should_disconnect during the health check

This commit is contained in:
Bryan Stitt 2023-10-24 23:35:30 -07:00
parent 2e3b40a885
commit d94e7f4453

View File

@ -647,6 +647,10 @@ impl Web3Rpc {
return Err(Web3ProxyError::OldHead(self.clone(), head_block));
}
if self.should_disconnect() {
return Err(anyhow::anyhow!("rpc should disconnect").into());
}
if detailed_healthcheck {
let block_number = head_block.number();