Skip to content

fix: add timeout to GatewayClient.request#1

Open
AkashaBot wants to merge 13 commits intomainfrom
fix/gatewayclient-request-timeout
Open

fix: add timeout to GatewayClient.request#1
AkashaBot wants to merge 13 commits intomainfrom
fix/gatewayclient-request-timeout

Conversation

@AkashaBot
Copy link
Owner

Fixes openclaw#4954

Adds a default request timeout (30s) to GatewayClient.request() to prevent indefinite hangs and pending-map growth during partial disconnects.

Also clears timeout timers on resolve/reject and when flushing pending requests after the websocket closes.

AkashaBot and others added 13 commits February 2, 2026 12:26
The Dockerfile CMD runs without arguments, causing the CLI to print
help and exit with code 1. This breaks deployment on container
platforms (Render, Railway, Fly.io, etc.) that rely on the CMD.

Changes:
- Add `gateway` subcommand to start the server
- Add `--allow-unconfigured` to allow startup without config file
- Add `--bind lan` to bind to 0.0.0.0 instead of localhost
  (required for container health checks)

Fixes openclaw#5685
Addresses review feedback: --bind lan requires auth token, so default
CMD should bind to loopback only.

For container platforms needing LAN binding for health checks:
1. Set OPENCLAW_GATEWAY_TOKEN env var
2. Override CMD: ["node","dist/index.js","gateway","--allow-unconfigured","--bind","lan"]
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.

[Bug]: GatewayClient.request() has no timeout, causing indefinite hangs

5 participants