Improved RPC timeout handling (#770)

* Handle slow app level responses for RPC

* Correct errors

* Terminates stream on error
This commit is contained in:
Age Manning
2020-01-08 14:18:06 +11:00
committed by GitHub
parent f36a5a15d6
commit 30f51df4cf
3 changed files with 133 additions and 71 deletions

View File

@@ -564,6 +564,9 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
) -> ProcessingResult {
batch.retries += 1;
// TODO: Handle partially downloaded batches. Update this when building a new batch
// processor thread.
if batch.retries > MAX_BATCH_RETRIES {
// chain is unrecoverable, remove it
ProcessingResult::RemoveChain