fix: resolve type inference issues in StdioClientTransport
- Add explicit Void type parameter to Mono.defer() call - Chain .then() to Mono.delay() to ensure consistent Mono<Void> return type Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
f3b0774a24
commit
b5ece766e7
1 changed files with 2 additions and 2 deletions
|
|
@ -346,14 +346,14 @@ public class StdioClientTransport implements McpClientTransport {
|
||||||
return Mono.fromRunnable(() -> {
|
return Mono.fromRunnable(() -> {
|
||||||
isClosing = true;
|
isClosing = true;
|
||||||
logger.debug("Initiating graceful shutdown");
|
logger.debug("Initiating graceful shutdown");
|
||||||
}).then(Mono.defer(() -> {
|
}).then(Mono.<Void>defer(() -> {
|
||||||
// First complete all sinks to stop accepting new messages
|
// First complete all sinks to stop accepting new messages
|
||||||
inboundSink.tryEmitComplete();
|
inboundSink.tryEmitComplete();
|
||||||
outboundSink.tryEmitComplete();
|
outboundSink.tryEmitComplete();
|
||||||
errorSink.tryEmitComplete();
|
errorSink.tryEmitComplete();
|
||||||
|
|
||||||
// Give a short time for any pending messages to be processed
|
// Give a short time for any pending messages to be processed
|
||||||
return Mono.delay(Duration.ofMillis(100));
|
return Mono.delay(Duration.ofMillis(100)).then();
|
||||||
})).then(Mono.defer(() -> {
|
})).then(Mono.defer(() -> {
|
||||||
logger.debug("Sending TERM to process");
|
logger.debug("Sending TERM to process");
|
||||||
if (this.process != null) {
|
if (this.process != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue