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

client-go timeouts do not work for non WATCH #23

Closed
szuecs opened this issue Aug 17, 2018 · 0 comments · Fixed by #24
Closed

client-go timeouts do not work for non WATCH #23

szuecs opened this issue Aug 17, 2018 · 0 comments · Fixed by #24
Labels
bug Something isn't working

Comments

@szuecs
Copy link
Member

szuecs commented Aug 17, 2018

upstream issue kubernetes/client-go#374

One fix that would work is wrapping the code with an external timeout, which is not nice but works:

    done := make(chan bool, 1) // NB: buffered
    go func() {
        operationWithoutTimeout()
        done <- true
    }()
    // variance control of operation
    select {
    case <-done:
    case <-time.After(3 * time.Millisecond):
    }
@szuecs szuecs added the bug Something isn't working label Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant