forked from cerc-io/plugeth
les: fix distReq.sentChn double close bug (#17639)
This commit is contained in:
parent
86a03f97d3
commit
d4a28a13ca
@ -114,7 +114,9 @@ func (d *requestDistributor) loop() {
|
|||||||
d.lock.Lock()
|
d.lock.Lock()
|
||||||
elem := d.reqQueue.Front()
|
elem := d.reqQueue.Front()
|
||||||
for elem != nil {
|
for elem != nil {
|
||||||
close(elem.Value.(*distReq).sentChn)
|
req := elem.Value.(*distReq)
|
||||||
|
close(req.sentChn)
|
||||||
|
req.sentChn = nil
|
||||||
elem = elem.Next()
|
elem = elem.Next()
|
||||||
}
|
}
|
||||||
d.lock.Unlock()
|
d.lock.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user