From dfa7f808827447d12a515577edd1b2710edf6a66 Mon Sep 17 00:00:00 2001 From: 4shen0ne <33086594+zrquan@users.noreply.github.com> Date: Sat, 27 Jul 2024 18:35:42 +0800 Subject: [PATCH] no need for browser.close() When the katana process exits, rod will automatically kill the browser process. --- pkg/engine/hybrid/hybrid.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/engine/hybrid/hybrid.go b/pkg/engine/hybrid/hybrid.go index bc9e3e5e..3e4e422b 100644 --- a/pkg/engine/hybrid/hybrid.go +++ b/pkg/engine/hybrid/hybrid.go @@ -96,11 +96,6 @@ func New(options *types.CrawlerOptions) (*Crawler, error) { // Close closes the crawler process func (c *Crawler) Close() error { - if c.Options.Options.ChromeWSUrl == "" { - if err := c.browser.Close(); err != nil { - return err - } - } if c.Options.Options.ChromeDataDir == "" { if err := os.RemoveAll(c.tempDir); err != nil { return err