Skip to content

Commit 6423fcd

Browse files
committed
WIP: make it compile
Signed-off-by: Dariusz Jędrzejczyk <[email protected]>
1 parent cef7aac commit 6423fcd

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

mcp/src/main/java/io/modelcontextprotocol/server/McpAsyncServerExchange.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import io.modelcontextprotocol.spec.McpSchema;
1414
import io.modelcontextprotocol.spec.McpSchema.LoggingLevel;
1515
import io.modelcontextprotocol.spec.McpSchema.LoggingMessageNotification;
16+
import io.modelcontextprotocol.spec.McpServerSession;
1617
import io.modelcontextprotocol.spec.McpSession;
1718
import io.modelcontextprotocol.spec.McpTransportContext;
1819
import io.modelcontextprotocol.util.Assert;
@@ -63,6 +64,7 @@ public class McpAsyncServerExchange {
6364
@Deprecated
6465
public McpAsyncServerExchange(McpSession session, McpSchema.ClientCapabilities clientCapabilities,
6566
McpSchema.Implementation clientInfo) {
67+
this.sessionId = null;
6668
this.session = session;
6769
this.clientCapabilities = clientCapabilities;
6870
this.clientInfo = clientInfo;

mcp/src/main/java/io/modelcontextprotocol/spec/McpServerSession.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ private Mono<Void> handleIncomingNotification(McpSchema.JSONRPCNotification noti
246246
return Mono.defer(() -> {
247247
if (McpSchema.METHOD_NOTIFICATION_INITIALIZED.equals(notification.method())) {
248248
this.state.lazySet(STATE_INITIALIZED);
249+
// FIXME: The session ID passed here is not the same as the one in the
250+
// legacy SSE transport.
249251
exchangeSink.tryEmitValue(new McpAsyncServerExchange(this.id, this, clientCapabilities.get(),
250252
clientInfo.get(), McpTransportContext.EMPTY));
251253
return this.initNotificationHandler.handle();

0 commit comments

Comments
 (0)