Skip to content

exec_started write error silently discarded allowing handler to continue with broken pipe #7779

@aashu2006

Description

@aashu2006

User Request

Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 169b2a12-8057-4120-87a6-6bc6cbada2e5

Description

What happened:
In pkg/api/handlers/exec.go:405, the exec_started message write error is explicitly discarded with _ = c.WriteMessage(websocket.TextMessage, startMsg). If the write fails the handler continues into executor.StreamWithContext, giving the client no notification and proceeding with a broken pipe.

What I expected:
The write error should be checked — if it fails the handler should return early rather than continuing into the exec stream.

Steps to reproduce:

  1. Close the WebSocket connection just before exec starts
  2. Observe the handler continues into StreamWithContext despite the failed write

This issue was automatically created from the KubeStellar Console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedai-processingAI is currently processing this issuekind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions