User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 7e4b28df-cb91-4ea0-bbb8-2104b33c8003
Description
What happened:
In pkg/api/handlers/websocket.go:176-180, Hub.Close() only closes h.done causing Hub.Run() to return. But Run() is the only path that closes client.send channels via the unregister case. When Run exits, no client.send channel is closed, so every writer goroutine blocks forever on <-client.send until TCP connections are forcibly closed.
What I expected:
Before closing h.done, Hub.Close() should iterate h.clients under h.mu.Lock() and close every client.send channel to unblock writer goroutines immediately.
Steps to reproduce:
- Connect multiple WebSocket clients
- Call Hub.Close()
- Observe writer goroutines remain blocked until TCP connections are forcibly closed
This issue was automatically created from the KubeStellar Console.
User Request
Type: bug
Target: Console Application
Submitted by: @aashu2006
Console Request ID: 7e4b28df-cb91-4ea0-bbb8-2104b33c8003
Description
What happened:
In
pkg/api/handlers/websocket.go:176-180,Hub.Close()only closesh.donecausingHub.Run()to return. ButRun()is the only path that closesclient.sendchannels via the unregister case. WhenRunexits, noclient.sendchannel is closed, so every writer goroutine blocks forever on<-client.senduntil TCP connections are forcibly closed.What I expected:
Before closing
h.done,Hub.Close()should iterateh.clientsunderh.mu.Lock()and close everyclient.sendchannel to unblock writer goroutines immediately.Steps to reproduce:
This issue was automatically created from the KubeStellar Console.