Skip to content

Missing timeout: TypeScript SDK server-manager — health check fetch (isReady) #210

@realfishsam

Description

@realfishsam

Location

sdks/typescript/pmxt/server-manager.ts:111

Code

// isReady() check
const response = await fetch(`http://localhost:${port}/health`);

Risk

The isReady() health check calls fetch against the local sidecar server with no timeout. If the local server is hung (e.g., during a crash loop or deadlock), this call never returns, blocking callers of isReady() indefinitely.

Affected Methods

  • ServerManager.isReady() — used to gate SDK initialization

Suggested Fix

const response = await fetch(`http://localhost:${port}/health`, {
    signal: AbortSignal.timeout(5_000),
});

Found by automated missing timeout audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions