From d4a28a13ca4c36019d23da6342e7e55b1d406fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felf=C3=B6ldi=20Zsolt?= Date: Fri, 14 Sep 2018 22:14:29 +0200 Subject: les: fix distReq.sentChn double close bug (#17639) --- les/distributor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'les') diff --git a/les/distributor.go b/les/distributor.go index d3f6b21d1..f90765b62 100644 --- a/les/distributor.go +++ b/les/distributor.go @@ -114,7 +114,9 @@ func (d *requestDistributor) loop() { d.lock.Lock() elem := d.reqQueue.Front() for elem != nil { - close(elem.Value.(*distReq).sentChn) + req := elem.Value.(*distReq) + close(req.sentChn) + req.sentChn = nil elem = elem.Next() } d.lock.Unlock() -- cgit v1.2.3