Streamable HTTP server: keep alive on, 30 minutes by default
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
This commit is contained in:
parent
1178539050
commit
9948eecbb7
1 changed files with 2 additions and 2 deletions
|
|
@ -996,7 +996,7 @@ public class HttpServletStreamableServerTransportProvider extends HttpServlet
|
||||||
private McpTransportContextExtractor<HttpServletRequest> contextExtractor = (
|
private McpTransportContextExtractor<HttpServletRequest> contextExtractor = (
|
||||||
serverRequest) -> McpTransportContext.EMPTY;
|
serverRequest) -> McpTransportContext.EMPTY;
|
||||||
|
|
||||||
private Duration keepAliveInterval;
|
private Duration keepAliveInterval = Duration.ofMinutes(30);
|
||||||
|
|
||||||
private ServerHttpHeaderValidator httpHeaderValidator = ServerHttpHeaderValidator.NOOP;
|
private ServerHttpHeaderValidator httpHeaderValidator = ServerHttpHeaderValidator.NOOP;
|
||||||
|
|
||||||
|
|
@ -1055,7 +1055,7 @@ public class HttpServletStreamableServerTransportProvider extends HttpServlet
|
||||||
* Sets the keep-alive interval for the transport. If set, a keep-alive scheduler
|
* Sets the keep-alive interval for the transport. If set, a keep-alive scheduler
|
||||||
* will be activated to periodically ping active sessions.
|
* will be activated to periodically ping active sessions.
|
||||||
* @param keepAliveInterval The interval for keep-alive pings. If null, no
|
* @param keepAliveInterval The interval for keep-alive pings. If null, no
|
||||||
* keep-alive will be scheduled.
|
* keep-alive will be scheduled. Defaults to 30 minutes.
|
||||||
* @return this builder instance
|
* @return this builder instance
|
||||||
*/
|
*/
|
||||||
public Builder keepAliveInterval(Duration keepAliveInterval) {
|
public Builder keepAliveInterval(Duration keepAliveInterval) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue