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

Commit fc89e7a

Browse files
committed
headless mode does not wait and shutdown
1 parent fd2816a commit fc89e7a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

trackers/chrome_tracker.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,6 @@ func ChromeTracker(url, xpath *string) (string, bool) {
5050
return err.Error(), false
5151
}
5252

53-
defer func() {
54-
ctx, cancel := context.WithTimeout(context.Background(), time.Second*20)
55-
if err := c.Shutdown(ctx); err != nil {
56-
log.Printf("WARN: shutdown chrome with error %s", err.Error())
57-
}
58-
cancel()
59-
60-
if err := c.Wait(); err != nil {
61-
log.Printf("WARN: wait for chrome with error %s", err.Error())
62-
}
63-
}()
64-
6553
var res string
6654
tasks := chromedp.Tasks{
6755
chromedp.Navigate(*url),

0 commit comments

Comments
 (0)