Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit f00ad8c

Browse files
committed
Add page.reload early context cancel detection
Sometimes the context gets canceled and leads to NPE.
1 parent 0fb3063 commit f00ad8c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

common/page.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,7 @@ func (p *Page) Reload(opts sobek.Value) (*Response, error) { //nolint:funlen,cyc
10851085
)
10861086
select {
10871087
case <-p.ctx.Done():
1088+
err = fmt.Errorf("reloading page: %w", p.ctx.Err())
10881089
case <-timeoutCtx.Done():
10891090
err = wrapTimeoutError(timeoutCtx.Err())
10901091
case event := <-waitForFrameNavigation:

0 commit comments

Comments
 (0)