@bulletproof-sh/ctrl-daemon 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5087,7 +5087,9 @@ function createServer({ port, host, agents }) {
5087
5087
  try {
5088
5088
  return Bun.serve(makeServerConfig(boundPort));
5089
5089
  } catch (err) {
5090
- const isAddrInUse = err instanceof Error && (err.message.includes("EADDRINUSE") || err.message.includes("address already in use"));
5090
+ const errCode = err.code ?? "";
5091
+ const errMsg = err instanceof Error ? err.message : "";
5092
+ const isAddrInUse = errCode === "EADDRINUSE" || errMsg.includes("EADDRINUSE") || errMsg.includes("address already in use");
5091
5093
  if (!isAddrInUse || attempt === PORT_RETRY_LIMIT - 1)
5092
5094
  throw err;
5093
5095
  boundPort++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bulletproof-sh/ctrl-daemon",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "WebSocket daemon for ctrl — watches Claude Code sessions and broadcasts agent state",
5
5
  "type": "module",
6
6
  "license": "BUSL-1.1",