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

DVSNI (VA) timeout #318

Merged
merged 3 commits into from
Jun 6, 2015
Merged

DVSNI (VA) timeout #318

merged 3 commits into from
Jun 6, 2015

Conversation

rolandshoemaker
Copy link
Contributor

Fixes #226, this only adds a timeout to the DVSNI dialer since the comment on the HTTP Client struct seems to imply that the set timeout includes TCP connection time etc...

    // Timeout specifies a time limit for requests made by this
    // Client. The timeout includes connection time, any
    // redirects, and reading the response body. The timer remains
    // running after Get, Head, Post, or Do return and will
    // interrupt reading of the Response.Body.

If this isn't the case (I haven't had a chance to test it), we can set a timeout at the TCP level by altering the Transport on L78 to include a custom dialer, as such

Dial: (&net.Dialer{Timeout:   5 * time.Second}).Dial,

@coveralls
Copy link

Coverage Status

Coverage remained the same at 43.33% when pulling 99d7ed7 on va-timeout into ef5f95d on master.

@jcjones
Copy link
Contributor

jcjones commented Jun 6, 2015

Let's make a test for these two timeouts. We can either do that in #226, or in this PR. As-is, I don't want to call something with this potential impact fixed unless we can write a little loopback test.

@rolandshoemaker
Copy link
Contributor Author

Just about to add a test for this, should be pushed in a bit.

@jcjones
Copy link
Contributor

jcjones commented Jun 6, 2015

This is clear to merge when the tests pass.

jcjones added a commit that referenced this pull request Jun 6, 2015
@jcjones jcjones merged commit d6220b2 into master Jun 6, 2015
@jcjones jcjones deleted the va-timeout branch June 6, 2015 17:14
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.

3 participants