mirror of
https://github.com/libp2p/go-libp2p-resource-manager.git
synced 2025-03-11 01:30:40 +08:00
Fix comment
This commit is contained in:
parent
7ecf0fc714
commit
297cd00321
3
rcmgr.go
3
rcmgr.go
@ -571,7 +571,6 @@ func (s *connectionScope) transferAllowedToStandard() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *connectionScope) SetPeer(p peer.ID) error {
|
func (s *connectionScope) SetPeer(p peer.ID) error {
|
||||||
// TODO check if this connectionscope is part of the allowlist and do the peer checking if so.
|
|
||||||
s.Lock()
|
s.Lock()
|
||||||
defer s.Unlock()
|
defer s.Unlock()
|
||||||
|
|
||||||
@ -588,7 +587,7 @@ func (s *connectionScope) SetPeer(p peer.ID) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if s.isAllowlisted && !s.rcmgr.allowlist.AllowedPeerAndMultiaddr(p, s.endpoint) {
|
if s.isAllowlisted && !s.rcmgr.allowlist.AllowedPeerAndMultiaddr(p, s.endpoint) {
|
||||||
// This is not a allowed peer + multiaddr combination. We need to
|
// This is not an allowed peer + multiaddr combination. We need to
|
||||||
// transfer this connection to the general scope. We'll do this first by
|
// transfer this connection to the general scope. We'll do this first by
|
||||||
// transferring the connection to the system and transient scopes, then
|
// transferring the connection to the system and transient scopes, then
|
||||||
// continue on with this function. The idea is that a connection
|
// continue on with this function. The idea is that a connection
|
||||||
|
Loading…
Reference in New Issue
Block a user