ax(node): replace prose comment with usage example on handleWSUpgrade
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

The comment "handleWSUpgrade handles incoming WebSocket connections" restated
the function signature without adding information. Replaced with a concrete
call-site example showing how the method is wired in via Start().

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 11:18:29 +01:00
parent 9e4bb376e8
commit cb02cdb6b8
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -411,7 +411,7 @@ func (t *Transport) GetConnection(peerID string) *PeerConnection {
return t.conns[peerID]
}
// handleWSUpgrade handles incoming WebSocket connections.
// mux.HandleFunc(cfg.WSPath, t.handleWSUpgrade) // registered in NewTransport via Start()
func (t *Transport) handleWSUpgrade(w http.ResponseWriter, r *http.Request) {
// Enforce MaxConns limit (including pending connections during handshake)
t.mutex.RLock()