Unnamed repository; edit this file 'description' to name the repository.
fix(helix-dap): seq number must start at 1 (#14706)
Co-authored-by: Michael Davis <[email protected]>
| -rw-r--r-- | helix-dap/src/client.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs index e5824a7f..fe4af188 100644 --- a/helix-dap/src/client.rs +++ b/helix-dap/src/client.rs @@ -231,7 +231,11 @@ impl Client { } fn next_request_id(&self) -> u64 { - self.request_counter.fetch_add(1, Ordering::Relaxed) + // > The `seq` for the first message sent by a client or debug adapter + // > is 1, and for each subsequent message is 1 greater than the + // > previous message sent by that actor + // <https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_ProtocolMessage> + self.request_counter.fetch_add(1, Ordering::Relaxed) + 1 } // Internal, called by specific DAP commands when resuming |