From 8a765938e8d61954a0ec8dcf1b27940e804abc41 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 5 Jul 2023 18:46:40 +1000 Subject: [PATCH] Bypass the task_spawner for `node/version` --- beacon_node/http_api/src/lib.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/beacon_node/http_api/src/lib.rs b/beacon_node/http_api/src/lib.rs index b2fe7678e1..c3ca7c3d3a 100644 --- a/beacon_node/http_api/src/lib.rs +++ b/beacon_node/http_api/src/lib.rs @@ -2479,13 +2479,12 @@ pub fn serve( .and(warp::path("node")) .and(warp::path("version")) .and(warp::path::end()) - .and(task_spawner_filter.clone()) - .and_then(|task_spawner: TaskSpawner| { - task_spawner.blocking_json_task(Priority::P1, move || { - Ok(api_types::GenericResponse::from(api_types::VersionData { - version: version_with_platform(), - })) - }) + // Bypass the `task_spawner` since this method returns a static string. + .then(|| async { + warp::reply::json(&api_types::GenericResponse::from(api_types::VersionData { + version: version_with_platform(), + })) + .into_response() }); // GET node/syncing