Skip to content

Commit 4dc78bf

Browse files
Update lib/mcp/server.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Brian Horakh <35611074+elasticdotventures@users.noreply.github.com>
1 parent 7cd4e31 commit 4dc78bf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/mcp/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ function createTransport(options = {}) {
345345
});
346346

347347
// Set timeouts to protect against slow HTTP attacks
348-
httpServer.timeout = 120000; // 2 minutes
349-
httpServer.headersTimeout = 60000; // 1 minute
350-
httpServer.requestTimeout = 120000; // 2 minutes
348+
httpServer.timeout = HTTP_SERVER_TIMEOUT_MS;
349+
httpServer.headersTimeout = HTTP_HEADERS_TIMEOUT_MS;
350+
httpServer.requestTimeout = HTTP_REQUEST_TIMEOUT_MS;
351351
httpServer.listen(port, host, () => {
352352
if (process.env.PM2_MCP_DEBUG === 'true') {
353353
console.error('[pm2-mcp][debug] HTTP transport listening', `${host}:${port}${pathPart}`);

0 commit comments

Comments
 (0)