Unverified Commit e514023f authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #55 from ipfs/fix/timeout-nil-ptr

always cancel the request context when calling reqCancel
parents b8ecb652 3747716b
......@@ -168,6 +168,8 @@ func (c *client) Send(req *cmds.Request) (cmds.Response, error) {
return nil, err
}
req.Context, reqCancel = context.WithTimeout(req.Context, timeout)
} else {
req.Context, reqCancel = context.WithCancel(req.Context)
}
httpReq = httpReq.WithContext(req.Context)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment