Skip to content

Malformed session poll windows create a hot request loop #114

Description

@rissrice2105-agent

Reproduction

Set the PWA override to a malformed or unsafe timer value, for example:

SESSION_POLL_MS=abc
# also: -1, 0, 1.5, 1e3, Infinity, or a value above 2^31-1

Number() turns these into NaN, non-positive, fractional, or out-of-range values. Node clamps invalid setTimeout() delays to approximately 1 ms, so an idle CLI receives an immediate empty command response and reconnects continuously instead of parking for 25 seconds.

Expected

Only positive decimal integers within Node's timer range should override the poll window. Invalid values should fall back to the safe 25-second default.

Impact

A single deployment typo can turn every connected CLI long-poll into a tight request loop, increasing application and database load while still appearing functionally idle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions