-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is looking quite ergonomic and nice!
a59b688
to
e068fbb
Compare
} | ||
return nil, fmt.Errorf("gater rejected connection with peer %s and addr %s with direction %d", | ||
sconn.RemotePeer().Pretty(), maconn.RemoteMultiaddr(), dir) | ||
} | ||
if p == "" && connScope != nil { | ||
if err := connScope.SetPeer(sconn.RemotePeer()); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a Done in the error path, as we own it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so where is this getting Done? The caller is responsible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
722a883
to
be66941
Compare
92eaefd
to
a01b952
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo the comment.
Depends on libp2p/go-libp2p-core#229.
TODO: write tests.