diff --git a/pkg/node/controller.go b/pkg/node/controller.go index a33bd00..f71570e 100644 --- a/pkg/node/controller.go +++ b/pkg/node/controller.go @@ -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 }