Description
WebhookService.send() (src/webhook/webhook.service.ts) builds a raw http.request()/https.request() call with no timeout option set and no req.setTimeout(...) call. If a registered webhook endpoint accepts the TCP connection but never responds (or responds arbitrarily slowly), the request hangs indefinitely — sendWithRetry()'s per-attempt delay (1000 * (i + 1)) only kicks in after a request settles (resolves or rejects), so a single unresponsive endpoint can stall dispatch to that endpoint far longer than intended, and since dispatch() awaits Promise.allSettled across all endpoints, a slow endpoint delays the overall dispatch() call's resolution for every caller that awaits it (e.g. EscrowController.raiseDispute, every worker's sweep loop).
Component
Backend
Difficulty
🟢 Easy
Tasks
Acceptance Criteria
Estimated Time
2-4 hours
Description
WebhookService.send()(src/webhook/webhook.service.ts) builds a rawhttp.request()/https.request()call with notimeoutoption set and noreq.setTimeout(...)call. If a registered webhook endpoint accepts the TCP connection but never responds (or responds arbitrarily slowly), the request hangs indefinitely —sendWithRetry()'s per-attempt delay (1000 * (i + 1)) only kicks in after a request settles (resolves or rejects), so a single unresponsive endpoint can stall dispatch to that endpoint far longer than intended, and sincedispatch()awaitsPromise.allSettledacross all endpoints, a slow endpoint delays the overalldispatch()call's resolution for every caller that awaits it (e.g.EscrowController.raiseDispute, every worker's sweep loop).Component
Backend
Difficulty
🟢 Easy
Tasks
http/httpsrequest inWebhookService.send()(e.g.req.setTimeout(ms, () => req.destroy(new Error('timeout'))))Acceptance Criteria
Estimated Time
2-4 hours