fixed empty context in call to NewRemoteAllocator

This commit is contained in:
Albert Bronsky 2021-08-08 14:07:08 +03:00 committed by GitHub
parent d3bdaf6240
commit f73f83e493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@ func (c *Client) doRequestChrome(req *Request) (*Response, error) {
var ctx context.Context
var cancel context.CancelFunc
if c.opt.RemoteAllocatorURL != "" {
ctx, cancel = chromedp.NewRemoteAllocator(ctx, c.opt.RemoteAllocatorURL)
ctx, cancel = chromedp.NewRemoteAllocator(context.Background(), c.opt.RemoteAllocatorURL)
} else {
ctx, cancel = chromedp.NewExecAllocator(context.Background(), c.opt.AllocatorOptions...)
}