diff --git a/pkg/node/transport.go b/pkg/node/transport.go index 3613fcd..e5b0250 100644 --- a/pkg/node/transport.go +++ b/pkg/node/transport.go @@ -404,7 +404,8 @@ func (t *Transport) Broadcast(msg *Message) error { return lastErr } -// GetConnection returns an active connection to a peer. +// conn := transport.GetConnection(peer.ID) +// if conn == nil { return fmt.Errorf("peer not connected") } func (t *Transport) GetConnection(peerID string) *PeerConnection { t.mutex.RLock() defer t.mutex.RUnlock()