Merge pull request #84 from libp2p/fix-build

fix build
This commit is contained in:
Steven Allen 2021-09-02 22:26:32 +02:00 committed by GitHub
commit 169748caf2
1 changed files with 3 additions and 3 deletions

View File

@ -238,9 +238,9 @@ func (cm *BasicConnMgr) TrimOpenConns(ctx context.Context) {
}
func (cm *BasicConnMgr) background() {
interval := cm.gracePeriod / 2
if interval < cm.silencePeriod {
interval = cm.silencePeriod
interval := cm.cfg.gracePeriod / 2
if interval < cm.cfg.silencePeriod {
interval = cm.cfg.silencePeriod
}
if interval < 10*time.Second {
interval = 10 * time.Second