From 5dc1e0f3af83bdae1feead55675d7b559d7cd681 Mon Sep 17 00:00:00 2001 From: zhongjiajia Date: Thu, 24 Jan 2019 15:46:41 +0800 Subject: [PATCH] use buffered chan for h.detached --- handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler.go b/handler.go index 8107e3e..fd87234 100644 --- a/handler.go +++ b/handler.go @@ -89,7 +89,7 @@ func (h *TargetHandler) Run(ctxt context.Context) error { h.qres = make(chan *cdproto.Message) h.qevents = make(chan *cdproto.Message) h.res = make(map[int64]chan *cdproto.Message) - h.detached = make(chan *inspector.EventDetached) + h.detached = make(chan *inspector.EventDetached, 1) h.pageWaitGroup = new(sync.WaitGroup) h.domWaitGroup = new(sync.WaitGroup) h.Unlock()