From 2ca2bb07424e5a78c67a1c06f477afdc116be9da Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Wed, 1 Jan 2025 22:22:42 -0500 Subject: [PATCH] close playwright instance on browser close --- playwright.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playwright.go b/playwright.go index ef6ce97..0e81340 100644 --- a/playwright.go +++ b/playwright.go @@ -245,8 +245,9 @@ func (b playWrightBrowser) Open(ctx context.Context, url string, opts OpenPageOp func (b playWrightBrowser) Close() error { return errors.Join( - b.ctx.Close(), b.browser.Close(), + b.ctx.Close(), + b.pw.Stop(), ) }