From 093cddbcb6840b6ee1919d2bd66ea4f3b207ad2f Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 18 Jul 2025 10:11:58 +0800 Subject: [PATCH] feat: configure HTTP server heartbeat interval to 30 seconds - Import the time package to support time-based configuration - Set the HTTP server's heartbeat interval to 30 seconds using a new option in its initialization Signed-off-by: Bo-Yi Wu --- operation/operation.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/operation/operation.go b/operation/operation.go index ff08c77..ab886e9 100644 --- a/operation/operation.go +++ b/operation/operation.go @@ -2,6 +2,7 @@ package operation import ( "fmt" + "time" "gitea.com/gitea/gitea-mcp/operation/issue" "gitea.com/gitea/gitea-mcp/operation/pull" @@ -61,6 +62,7 @@ func Run() error { httpServer := server.NewStreamableHTTPServer( mcpServer, server.WithLogger(log.New()), + server.WithHeartbeatInterval(30*time.Second), ) log.Infof("Gitea MCP HTTP server listening on :%d", flag.Port) if err := httpServer.Start(fmt.Sprintf(":%d", flag.Port)); err != nil {