Files
PaperClipAI/server
Dotta b2bf4599c3 fix(server): give the pinned remote MCP transport a response deadline
The pinned transport replaced platform fetch, and with it undici's
headersTimeout/bodyTimeout. Only the gateway tools/call path passes an
AbortSignal; the OAuth discovery, registration and token-exchange callers
pass none, so a remote server that accepted the connection and then stayed
silent would hold the request open indefinitely. That is a hang the code
this replaced did not have.

Adds a 300s default matching undici, applied as a hard headers deadline
(not req.setTimeout, which is socket-idle based and a dribbling server
could reset forever) plus an idle deadline between body chunks so a
half-sent body rejects in response.text() instead of hanging the caller.

Both new tests hang to the vitest timeout when the deadlines are removed.

Refs PAP-17098
2026-08-20 21:20:01 +00:00
..