From ac2106ced71caa99fc02968f8e89d51b8d7bb8ad Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Tue, 17 Jul 2018 16:39:07 -0700 Subject: [PATCH] strip deadline from stream --- client/rpc_client.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/client/rpc_client.go b/client/rpc_client.go index a342d2ce..856ffd5a 100644 --- a/client/rpc_client.go +++ b/client/rpc_client.go @@ -363,18 +363,6 @@ func (r *rpcClient) Stream(ctx context.Context, request Request, opts ...CallOpt return nil, err } - // check if we already have a deadline - d, ok := ctx.Deadline() - if !ok { - // no deadline so we create a new one - ctx, _ = context.WithTimeout(ctx, callOpts.RequestTimeout) - } else { - // got a deadline so no need to setup context - // but we need to set the timeout we pass along - opt := WithRequestTimeout(d.Sub(time.Now())) - opt(&callOpts) - } - // should we noop right here? select { case <-ctx.Done():