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

rpc/client: Use dial timeout properly #419

Merged

Commits on Oct 3, 2022

  1. [nspcc-dev#419] rpc/client: Block until client connection is up

    In previous implementation `Client` didn't block until the connection is
    up on dial stage. This caused the dial timeout to have no effect.
    
    Provide `WithBlock` dial option to `DialContext` call in `openGRPCConn`
    method. From now `Client` blocks for configured timeout until the
    connection is up.
    
    Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
    cthulhu-rider committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    1288cf9 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. [nspcc-dev#419] rpc/client: Use provided context for client dial

    In previous implementation `Client` passed `context.Background()` to
    `grpc.DialContext` function. This didn't allow to abort dial stage by
    the given context.
    
    Base dial context on the one provided with `WithContext` option. Fall
    back to using `context.Background` if context is not specified.
    
    Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
    cthulhu-rider committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    62298db View commit details
    Browse the repository at this point in the history