Skip to content

Commit 09a29ee

Browse files
committed
minor
1 parent 56124bc commit 09a29ee

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mcp-spring/mcp-spring-webmvc/src/main/java/io/modelcontextprotocol/server/transport/WebMvcStreamableServerTransportProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ public Mono<Void> closeGracefully() {
203203
this.sessions.clear();
204204
logger.debug("Graceful shutdown completed");
205205
}).then().doOnSuccess(v -> {
206-
logger.debug("Graceful shutdown completed");
207-
sessions.clear();
208206
if (this.keepAliveScheduler != null) {
209207
this.keepAliveScheduler.shutdown();
210208
}

mcp/src/main/java/io/modelcontextprotocol/util/KeepAliveScheduler.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public class KeepAliveScheduler {
5050
/** The current subscription for the keepAlive calls */
5151
private Disposable currentSubscription;
5252

53+
// TODO Currently we do not support the streams (streamable http session created by
54+
// http post/get)
55+
5356
/** Supplier for reactive McpSession instances */
5457
private final Supplier<Flux<McpSession>> mcpSessions;
5558

@@ -95,9 +98,10 @@ public Disposable start() {
9598
})
9699
.doOnCancel(() -> this.isRunning.set(false))
97100
.doOnComplete(() -> this.isRunning.set(false))
98-
.doOnError(error -> {
101+
.onErrorComplete(error -> {
99102
logger.error("KeepAlive scheduler error", error);
100103
this.isRunning.set(false);
104+
return true;
101105
})
102106
.subscribe();
103107

0 commit comments

Comments
 (0)