fix nil pointer panic in rpc backoff logic
If we don't get a session within the context we should error out instead of trying to OpenStream on a nil session.
@@ -162,6 +162,9 @@ func (c *Client) Request(ctx context.Context, request *Request, address net.Addr
case <-ctx.Done():
}
}
+ if ctx.Err() != nil {
+ return nil, ctx.Err()
+ }
stream, err := session.OpenStream()
if err != nil {
