Skip to content

v1.2.1 - Bugfix Release

Choose a tag to compare

@rossignoliluca rossignoliluca released this 04 Jan 16:26
· 111 commits to main since this release

Fix daemon stop IPC race condition

Bug: daemon stop via IPC would timeout because stop() closed the IPC server before sending response back to client.

Symptoms:

  • daemon stop reported "Daemon is not running" even when daemon was running
  • Daemon process remained alive after stop command
  • PID file was missing but process still active

Fix:

  • Use setImmediate() to schedule stop after response is sent
  • Add 'stopped' event emission for process cleanup
  • Keep-alive interval checks daemon.isRunning() to exit cleanly

Sequence now:

  1. Client sends stop command
  2. Server responds immediately with success
  3. Server stops after response (via setImmediate)
  4. Parent process detects stop and exits

Stats: 224 tests passing

🤖 Generated with Claude Code