Skip to content

Commit

Permalink
les: fix distReq.sentChn double close bug (ethereum#17639)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsfelfoldi authored and fjl committed Sep 14, 2018
1 parent 86a03f9 commit d4a28a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion les/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d4a28a1

Please sign in to comment.