From a61ab47765f3b9f12b0b618b5df8b71c263b3c13 Mon Sep 17 00:00:00 2001 From: clabby Date: Wed, 21 Aug 2024 14:46:47 -0400 Subject: [PATCH] chore(host): Remove TODOs (#438) Removes the TODO comments in the host server; The catch-all error handling here fits our usecase. --- bin/host/src/server.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/host/src/server.rs b/bin/host/src/server.rs index be39b2c3b..724fd31c6 100644 --- a/bin/host/src/server.rs +++ b/bin/host/src/server.rs @@ -85,8 +85,7 @@ where P: PreimageOracleServer, { loop { - // TODO: More granular error handling. Some errors here are expected, such as the - // client closing the pipe, while others are not and should throw. + // Break the loop on any error. An error in this path indicates a closed pipe. if server.next_preimage_request(fetcher).await.is_err() { break; } @@ -110,8 +109,7 @@ where H: HintReaderServer, { loop { - // TODO: More granular error handling. Some errors here are expected, such as the - // client closing the pipe, while others are not and should throw. + // Break the loop on any error. An error in this path indicates a closed pipe. if server.next_hint(router).await.is_err() { break; }