Skip to content

Client timeout of 0 causes immediate "context deadline exceeded" #126

@timbunce

Description

@timbunce

This is arguably a duplicate of #14 which pointed out a doc deficiency and was addressed by telling the user to use operations.New*Params() functions.

It's also arguably a duplicate of go-swagger/go-swagger#919 where somebody else stumbled into the same problem. @casualjim responded that "We need a way to express forever because there are certain cases where you really don't want a request to timeout.", "... you want the connection to be opened forever, forever is signaled by using 0" and the case was closed.

Unless I'm misunderstanding something that seems to be a mistake as the code doesn't operate that way.

I think the hasTimeout var should only be set true if request.timeout is non-zero.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions