Skip to content

Commit

Permalink
Fix issue, SSE connection will terminate after 30 seconds (DEFAULT).
Browse files Browse the repository at this point in the history
  • Loading branch information
zeko.zhang authored and tzolov committed Feb 25, 2025
1 parent c69cc18 commit dac5c54
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package io.modelcontextprotocol.server.transport;

import java.io.IOException;
import java.time.Duration;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
Expand Down Expand Up @@ -228,7 +229,7 @@ private ServerResponse handleSseConnection(ServerRequest request) {
logger.error("Failed to poll event from session queue: {}", e.getMessage());
sseBuilder.error(e);
}
});
}, Duration.ZERO);
}
catch (Exception e) {
logger.error("Failed to send initial endpoint event to session {}: {}", sessionId, e.getMessage());
Expand Down

0 comments on commit dac5c54

Please sign in to comment.