From ce0837dbb75badf39c9b1ac251fba9c3efbc57c4 Mon Sep 17 00:00:00 2001 From: xiaoma20082008 Date: Fri, 17 Feb 2023 00:21:12 +0800 Subject: DAP: Add request ID to request timeout message (#6018) This improves error logging for dap requests. Without the ID it's hard to know which request is the one that timed out.--- helix-dap/src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-dap/src/client.rs') diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index e72d290e..10d93180 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -254,7 +254,7 @@ impl Client { // TODO: specifiable timeout, delay other calls until initialize success timeout(Duration::from_secs(20), callback_rx.recv()) .await - .map_err(|_| Error::Timeout)? // return Timeout + .map_err(|_| Error::Timeout(id))? // return Timeout .ok_or(Error::StreamClosed)? .map(|response| response.body.unwrap_or_default()) // TODO: check response.success -- cgit v1.2.3-70-g09d2