Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.

Conversation

@Stebalien
Copy link
Member

@Stebalien Stebalien commented Jul 25, 2019

fixes #46

Also, don't count protected connections.

connmgr.go Outdated
// skip over protected peer.
continue
}
if inf.firstSeen.Add(cm.gracePeriod).After(now) {
Copy link
Member

Choose a reason for hiding this comment

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

I know you only shifted this block from below, but we can precompute the grace threshold only once before entering the loop.

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.

Don't count connections in the grace period

4 participants