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

peer: Set a default idle timeout if not specified. #2180

Merged
merged 1 commit into from
May 1, 2020

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented May 1, 2020

This modifies the peer initialization code to set a default idle timeout of two minutes if the caller did not specify one.

This is desirable since the default is the zero value otherwise, which results in an immediate disconnection for callers that don't specify a timeout.

It is worth noting that the server code already has a default setting that can be configured via the command-line or a configuration file which is used to configure the peers, so this has no effect on dcrd, but it is a nice addition for other consumers of the peer package.

@davecgh davecgh added this to the 1.6.0 milestone May 1, 2020
@davecgh davecgh closed this May 1, 2020
@davecgh davecgh force-pushed the peer_default_idle_timeout branch from c69a8b3 to 787d3f5 Compare May 1, 2020 22:25
This modifies the peer initialization code to set a default idle timeout
of two minutes if the caller did not specify one.

This is desirable since the default is the zero value otherwise, which
results in an immediate disconnection for callers that don't specify a
timeout.

It is worth noting that the server code already has a default setting
that can be configured via the command-line or a configuration file
which is used to configure the peers, so this has no effect on dcrd, but
it is a nice addition for other consumers of the peer package.
@davecgh davecgh reopened this May 1, 2020
@davecgh davecgh merged commit 3c128b7 into decred:master May 1, 2020
@davecgh davecgh deleted the peer_default_idle_timeout branch May 1, 2020 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants