aboutsummaryrefslogtreecommitdiff
path: root/helix-dap/src/client.rs
diff options
context:
space:
mode:
authorxiaoma200820082023-02-16 16:21:12 +0000
committerGitHub2023-02-16 16:21:12 +0000
commitce0837dbb75badf39c9b1ac251fba9c3efbc57c4 (patch)
tree5c3711f89e2cc4e7df5dcee72e17bbc189bcd6bf /helix-dap/src/client.rs
parent78a1e2db6035b326d7536fbd0fb60f9fc586d978 (diff)
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.
Diffstat (limited to 'helix-dap/src/client.rs')
-rw-r--r--helix-dap/src/client.rs2
1 files changed, 1 insertions, 1 deletions
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