Merged
Conversation
This was referenced Oct 5, 2018
Codecov Report
@@ Coverage Diff @@
## develop #2548 +/- ##
===========================================
+ Coverage 61.19% 61.23% +0.03%
===========================================
Files 202 202
Lines 16703 16681 -22
===========================================
- Hits 10222 10214 -8
+ Misses 5611 5599 -12
+ Partials 870 868 -2
|
melekes
reviewed
Oct 5, 2018
privval/socket.go
Outdated
| // set deadline before trying to read | ||
| conn := r.(net.Conn) | ||
| if err := conn.SetDeadline(time.Now().Add(time.Second * defaultConnDeadlineSeconds)); err != nil { | ||
| err = cmn.ErrorWrap(err, "setting connection timeout failedin readMsg") |
| defaultConnWaitSeconds = 60 | ||
| defaultDialRetries = 10 | ||
| defaultAcceptDeadlineSeconds = 30 // tendermint waits this long for remote val to connect | ||
| defaultConnDeadlineSeconds = 3 // must be set before each read |
Contributor
Author
There was a problem hiding this comment.
Should we set it on writes too?
Contributor
There was a problem hiding this comment.
Oh, if we have writes, then please ignore my comment. I haven't seen one...
melekes
approved these changes
Oct 6, 2018
Contributor
|
Looks like it's superseed by #2568. |
Contributor
|
Shouldn't we merge this small focused PR, and split up concerns in #2568? |
Contributor
Author
Yes I think so. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a quick-fix for #2027.
The problem is that we set the deadline once, but need to reset each time we want to read, else the first deadline will expire at some random later read.
Also note this is using the default. It seems the ability to use the options has been eliminated? We probably want to bring that back, and actually use an internal, configured value for the read deadline rather than the default.