Skip to content

no connect or per-call timeout - a wedged DFHack hangs the whole call queue #7

Description

@alexanderolvera

src/connection.ts:69-90, 160-165: neither connect() nor call() has any timeout. If DFHack accepts TCP but wedges (or a Lua script blocks the RPC thread), the caller hangs indefinitely — and because calls are queued (:148-154), everything behind the wedged call hangs too. For the MCP server this means a hung tool call with no recovery path.

Fix: add an optional timeoutMs (socket setTimeout + a per-call timer that rejects and destroys the connection). This is the one genuinely missing convenience in the API surface the MCP server consumes.

Found in the post-v1.0 review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions