les: fix distReq.sentChn double close bug

This commit is contained in:
Zsolt Felfoldi 2018-09-11 11:38:56 +02:00
parent 10bac36647
commit 2459f58612

View file

@ -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()