There was an error while loading. Please reload this page.
1 parent 02b0373 commit 227a361Copy full SHA for 227a361
parser/handler.go
@@ -192,13 +192,14 @@ func (t *Task) Parse(site string) (err error) {
192
193
pageWait := make(chan struct{}, 1)
194
195
-time.AfterFunc(t.cfg.Timeout, func() {
+tm := time.AfterFunc(t.cfg.Timeout, func() {
196
logrus.WithField("site", site).Debug("timeout triggered")
197
select {
198
case pageWait <- struct{}{}:
199
default:
200
}
201
})
202
+defer tm.Stop()
203
204
// page stopped loading event
205
t.remote.CallbackEvent("Page.frameStoppedLoading", func(params godet.Params) {
0 commit comments