mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-03-21 09:53:08 +00:00
fix: harden signal handlers with robust container detection (Issue #277)
Production-ready improvements based on comprehensive code review: Critical Fixes: - Robust container detection: Checks multiple env vars (IS_DOCKER, IS_CONTAINER) with flexible formats (true/1/yes) and filesystem markers (/.dockerenv, /run/.containerenv) for Docker, Kubernetes, Podman, containerd support - Fixed redundant exit calls: Removed immediate exit, use 1000ms timeout for graceful shutdown allowing cleanup to complete - Added error handling for stdin registration with try-catch - Added shutdown trigger logging (SIGTERM/SIGINT/SIGHUP/STDIN_END/STDIN_CLOSE) Improvements: - Increased timeout from 500ms to 1000ms for slower systems - Added null safety for stdin operations - Enhanced documentation explaining behavior in different environments - More descriptive variable names (isDocker → isContainer) Testing: - Supports Docker, Kubernetes, Podman, and other container runtimes - Graceful fallback if container detection fails - Works in Claude Desktop, containers, and manual execution Code Review: Approved by code-reviewer agent All critical and warning issues addressed Reported by: @Eddy-Chahed Issue: #277 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "n8n-mcp",
|
||||
"version": "2.16.0",
|
||||
"version": "2.16.1",
|
||||
"description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
Reference in New Issue
Block a user