Skip to content

fix: replace Mono.zip with Mono.when in StdioServerTransportProvider#sendMessage - #981

Closed
neerajbhatt wants to merge 1 commit into
modelcontextprotocol:mainfrom
neerajbhatt:fix/303-mono-zip-to-mono-when
Closed

neerajbhatt wants to merge 1 commit into
modelcontextprotocol:mainfrom
neerajbhatt:fix/303-mono-zip-to-mono-when

Conversation

@neerajbhatt

Copy link
Copy Markdown
Contributor

Summary

  • Mono.zip() in sendMessage() never completes because inboundReady and outboundReady are Sinks.One<Void> that emit null via tryEmitValue(null) — zip requires actual non-null values to produce a Tuple2
  • Replaced with Mono.when() which correctly waits for completion signals without requiring values

Test plan

  • All 9 existing StdioServerTransportProviderTests pass
  • CI pipeline passes

Closes #303

…sendMessage

Mono.zip requires actual values from each source to produce a Tuple2,
but inboundReady and outboundReady are Sinks.One<Void> that only emit
completion signals via tryEmitValue(null). This causes Mono.zip to never
complete, hanging sendMessage. Mono.when correctly waits for completion
signals without requiring values.

Closes modelcontextprotocol#303
@neerajbhatt

Copy link
Copy Markdown
Contributor Author

Closing as duplicate of #846 which already addresses this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StdioServerTransportProvider uses incorrect Mono.zip operator

1 participant