Skip to content

Medium: Stale closure in BuildLogPanel SSE onerror handler causes reconnect loop after build completes #13

@harsharajkumar

Description

@harsharajkumar

In BuildLogPanel.tsx:88-91, the es.onerror handler closes over the done variable from the initial render (false). When the build finishes and setDone(true) is called, the onerror handler still sees done === false and never calls es.close(). If the server drops the SSE connection after the build, the EventSource will keep reconnecting indefinitely after the build is already complete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmediumShould fix soon

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions