Skip to content

Commit 17e86a0

Browse files
liklethe-mikedavis
authored andcommitted
fix(helix-dap): seq number must start at 1 (helix-editor#14706)
Co-authored-by: Michael Davis <[email protected]>
1 parent 3b595ef commit 17e86a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

helix-dap/src/client.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,11 @@ impl Client {
231231
}
232232

233233
fn next_request_id(&self) -> u64 {
234-
self.request_counter.fetch_add(1, Ordering::Relaxed)
234+
// > The `seq` for the first message sent by a client or debug adapter
235+
// > is 1, and for each subsequent message is 1 greater than the
236+
// > previous message sent by that actor
237+
// <https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_ProtocolMessage>
238+
self.request_counter.fetch_add(1, Ordering::Relaxed) + 1
235239
}
236240

237241
// Internal, called by specific DAP commands when resuming

0 commit comments

Comments
 (0)