fix: accept stringified numeric response IDs (#1021)

This commit is contained in:
Dale Seo 2026-07-21 16:01:22 -04:00 • committed by GitHub
commit 8803d39034
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -687,7 +687,7 @@ where
let (response, response_id) =
expect_response(transport, "initialize response", service, peer.clone()).await?;
if id != response_id {
if !id.matches_response_id(&response_id) {
return Err(ClientInitializeError::ConflictInitResponseId(
id,
response_id,
@ -753,7 +753,7 @@ where
match expect_response(transport, "discover response", service, peer.clone()).await {
Ok((ServerResult::DiscoverResult(result), response_id)) => {
if response_id != id {
if !id.matches_response_id(&response_id) {
return Err(ClientInitializeError::ConflictInitResponseId(
id,
response_id,