make the Router include the RouterConfig
rather than copying the bulk of it
This commit is contained in:
1 parent
9b29d2ecc5
commit
798bfeb0a7
3 files changed
+16
-29
No files matched your search
@@ -245,8 +245,9 @@ func (peer *LocalPeer) broadcastPeerUpdate(peers ...*Peer) {
|
||||
}
|
||||
|
||||
func (peer *LocalPeer) checkConnectionLimit() error {
|
||||
if 0 != peer.router.ConnLimit && peer.ConnectionCount() >= peer.router.ConnLimit {
|
||||
return fmt.Errorf("Connection limit reached (%v)", peer.router.ConnLimit)
|
||||
limit := peer.router.ConnLimit
|
||||
if 0 != limit && peer.ConnectionCount() >= limit {
|
||||
return fmt.Errorf("Connection limit reached (%v)", limit)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user