diff --git a/beacon_node/rest_api/src/beacon.rs b/beacon_node/rest_api/src/beacon.rs index 73c6bd1ea91..f7887c48f0e 100644 --- a/beacon_node/rest_api/src/beacon.rs +++ b/beacon_node/rest_api/src/beacon.rs @@ -155,8 +155,10 @@ pub fn stream_forks( break; } }; - if let Err(bytes) = block_on(sender.send_data(chunk)) { - error!(log, "Couldn't stream piece {:?}", bytes); + match block_on(sender.send_data(chunk)) { + Err(e) if e.is_closed() => break, + Err(e) => error!(log, "Couldn't stream piece {:?}", e), + Ok(_) => (), } } });