Skip to content

fix: add daemon health check before spawn to prevent EADDRINUSE#1

Open
ace0ge wants to merge 1 commit into
mainfrom
fix/daemon-health-check
Open

fix: add daemon health check before spawn to prevent EADDRINUSE#1
ace0ge wants to merge 1 commit into
mainfrom
fix/daemon-health-check

Conversation

@ace0ge

@ace0ge ace0ge commented Apr 23, 2026

Copy link
Copy Markdown
Owner

Description

Add health check logic to prevent EADDRINUSE error when daemon port is already occupied.

Changes

  • Add checkDaemonHealth() function to verify existing daemon before starting a new process
  • In tryDaemonRequestWithSpawn(), check if daemon is already healthy before spawning
  • This prevents duplicate daemon processes and EADDRINUSE errors

Testing

Verified that open-websearch search "测试" --spawn correctly detects existing healthy daemon without starting a new process.

- Add checkDaemonHealth() function to verify existing daemon before starting new process
- In tryDaemonRequestWithSpawn(), check if daemon is already healthy before spawning
- This prevents EADDRINUSE error when daemon port is already occupied
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant