Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

use the Resource Manager #99

Merged
merged 1 commit into from
Jan 18, 2022
Merged

use the Resource Manager #99

merged 1 commit into from
Jan 18, 2022

Conversation

marten-seemann
Copy link
Contributor

Depends on libp2p/go-libp2p-core#229.

TODO: write tests.

Copy link
Contributor

@vyzo vyzo left a 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!

}
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 {
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listener.go Outdated Show resolved Hide resolved
upgrader.go Outdated Show resolved Hide resolved
Copy link
Contributor

@vyzo vyzo left a 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.

@marten-seemann marten-seemann merged commit 994ef3e into master Jan 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants