aboutsummaryrefslogtreecommitdiffstats
path: root/les
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2018-09-15 04:14:29 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-15 04:14:29 +0800
commitd4a28a13ca4c36019d23da6342e7e55b1d406fb5 (patch)
tree0e7bb5e89cbfb61cf34fbcae73fd13e5de57c4e5 /les
parent86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32 (diff)
downloadgo-tangerine-d4a28a13ca4c36019d23da6342e7e55b1d406fb5.tar
go-tangerine-d4a28a13ca4c36019d23da6342e7e55b1d406fb5.tar.gz
go-tangerine-d4a28a13ca4c36019d23da6342e7e55b1d406fb5.tar.bz2
go-tangerine-d4a28a13ca4c36019d23da6342e7e55b1d406fb5.tar.lz
go-tangerine-d4a28a13ca4c36019d23da6342e7e55b1d406fb5.tar.xz
go-tangerine-d4a28a13ca4c36019d23da6342e7e55b1d406fb5.tar.zst
go-tangerine-d4a28a13ca4c36019d23da6342e7e55b1d406fb5.zip
les: fix distReq.sentChn double close bug (#17639)
Diffstat (limited to 'les')
-rw-r--r--les/distributor.go4
1 files changed, 3 insertions, 1 deletions
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()