fix(transport): Add cleanup logic for inbound processing in StdioServerTransport
Resolves #72 Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
516da0bada
commit
48ab97bf23
1 changed files with 50 additions and 45 deletions
|
|
@ -118,6 +118,11 @@ public class StdioServerTransport implements ServerMcpTransport {
|
||||||
.flatMap(message -> Mono.just(message)
|
.flatMap(message -> Mono.just(message)
|
||||||
.transform(inboundMessageHandler)
|
.transform(inboundMessageHandler)
|
||||||
.contextWrite(ctx -> ctx.put("observation", "myObservation")))
|
.contextWrite(ctx -> ctx.put("observation", "myObservation")))
|
||||||
|
.doOnComplete(() -> {
|
||||||
|
this.outboundSink.tryEmitComplete();
|
||||||
|
this.inboundScheduler.dispose();
|
||||||
|
this.outboundScheduler.dispose();
|
||||||
|
})
|
||||||
.subscribe();
|
.subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue