diff --git a/src/lib_shell/bootstrap_pipeline.ml b/src/lib_shell/bootstrap_pipeline.ml index cbb7096d2..4c5412330 100644 --- a/src/lib_shell/bootstrap_pipeline.ml +++ b/src/lib_shell/bootstrap_pipeline.ml @@ -267,7 +267,8 @@ let rec validation_worker_loop pipeline = | Error [Exn Lwt.Canceled | Canceled | Exn Lwt_pipe.Closed] -> Lwt.return_unit | Error ([ Block_validator_errors.Invalid_block _ - | Block_validator_errors.Unavailable_protocol _ ] as err ) -> + | Block_validator_errors.Unavailable_protocol _ + | Timeout] as err ) -> (* Propagate the error to the peer validator. *) pipeline.errors <- pipeline.errors @ err ; Lwt_canceler.cancel pipeline.canceler >>= fun () -> diff --git a/src/lib_shell/worker.ml b/src/lib_shell/worker.ml index a8f32c38a..5109b995f 100644 --- a/src/lib_shell/worker.ml +++ b/src/lib_shell/worker.ml @@ -504,6 +504,9 @@ module Make end >>= function | Ok () -> loop () + | Error ([Timeout] as errs) -> + Logger.lwt_log_notice "Worker terminated with timeout" >>= fun () -> + do_close (Some errs) | Error errs -> Logger.lwt_log_error "@[Worker crashed:@,%a@]"