Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarm: add deadline for connection setup #91

Merged
merged 1 commit into from
Sep 18, 2016

Conversation

whyrusleeping
Copy link
Contributor

No description provided.

@whyrusleeping whyrusleeping added the status/in-progress In progress label Aug 18, 2016
deadline = time.Now().Add(ConnSetupTimeout)
}

if err := connC.SetDeadline(deadline); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Got it, you use the SetDeadline like a timeout :)

re: adding SetDeadline for muxed streams - A muxed stream should not timeout, since a conn was already established, so do we really need to make it part of the API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@diasdavid can you guarantee that the other side is going to read when you write? I can OOM your node by opening up lots of streams to it and just holding on to them

Copy link
Member

Choose a reason for hiding this comment

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

Good point. Is SetDeadline the best way to solve it? Seems a thing that helps towards the solution, but it would be nice to have a way to tell when to close connections and with which criteria.

@whyrusleeping whyrusleeping added need/review Needs a review and removed status/in-progress In progress labels Aug 26, 2016
@whyrusleeping whyrusleeping added the status/in-progress In progress label Sep 14, 2016
@whyrusleeping whyrusleeping merged commit 4d1c7a9 into master Sep 18, 2016
@whyrusleeping whyrusleeping deleted the fix/add-conn-setup-deadline branch September 18, 2016 12:41
marten-seemann added a commit that referenced this pull request Apr 27, 2022
sync: update CI config files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants