Skip to content

client timeout is 0 #14

@tompscanlan

Description

@tompscanlan

I was getting the error "context deadline exceeded" using a generated client. After some debugging, I discovered the default timeout is not affecting the call to Submit() in client/runtime.go.

request.timeout is 0 in this line:

ctx, cancel := context.WithTimeout(pctx, request.timeout)

Setting a good timeout just before that line gets me past the error.

request.SetTimeout(30 * time.Second)
ctx, cancel := context.WithTimeout(pctx, request.timeout)

Am I just using the client wrong, or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions