ax(node): rename channel to responseChannel in handleResponse

AX Principle 1 — predictable names over short names. The variable
`channel` in handleResponse required context to understand its role;
`responseChannel` is self-describing on first read.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 12:49:30 +01:00
parent 511066b844
commit ca3faa0144
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -45,15 +45,15 @@ func (ctrl *Controller) handleResponse(conn *PeerConnection, msg *Message) {
}
ctrl.mutex.Lock()
channel, exists := ctrl.pendingRequests[msg.ReplyTo]
responseChannel, exists := ctrl.pendingRequests[msg.ReplyTo]
if exists {
delete(ctrl.pendingRequests, msg.ReplyTo)
}
ctrl.mutex.Unlock()
if exists && channel != nil {
if exists && responseChannel != nil {
select {
case channel <- msg:
case responseChannel <- msg:
default:
// Channel full or closed
}