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

Fix dialLimiter.fdConsuming counting #26

Merged
merged 1 commit into from
Jul 31, 2017
Merged

Fix dialLimiter.fdConsuming counting #26

merged 1 commit into from
Jul 31, 2017

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Jul 28, 2017

This fixes ipfs/kubo#4102

With this fix when running daemon SYN_SENT connections are hovering around 150-200, which is a huge improvement from around 3000.

Unit tests are TODO

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 82.011% when pulling 895846a on fix/fdconsuming into 4ba23a7 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 81.992% when pulling a0436a0 on fix/fdconsuming into 4ba23a7 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 81.992% when pulling 9a1a71c on fix/fdconsuming into 4ba23a7 on master.

@magik6k
Copy link
Contributor Author

magik6k commented Jul 30, 2017

@whyrusleeping Fixed the fix to actually fix what needed to be fixed. +Added a test for it

Copy link
Contributor

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

Oh wow, great catch here. Thanks @magik6k :)

@whyrusleeping whyrusleeping requested a review from Stebalien July 31, 2017 06:59
limiter_test.go Outdated
if l.fdConsuming < 0 {
t.Fatalf("l.fdConsuming < 0")
}
fmt.Println(dials)
Copy link
Member

Choose a reason for hiding this comment

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

Best to remove the log here or use t.Log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't notice when doing commit, removed

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 81.992% when pulling 4a908bf on fix/fdconsuming into 4ba23a7 on master.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM (test failure looks related to GitHub's outage).

@Stebalien Stebalien merged commit 10021b2 into master Jul 31, 2017
@whyrusleeping whyrusleeping deleted the fix/fdconsuming branch August 1, 2017 04:55
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.

IPFS starts too many new connections on add
5 participants