les: wait for all task goroutines before dropping the peer (#20010)
* les: wait all task routines before drop the peer * les: address comments * les: fix issue
This commit is contained in:
committed by
Péter Szilágyi
parent
a978adfd7c
commit
68502595f6
10
les/peer.go
10
les/peer.go
@ -94,6 +94,7 @@ type peer struct {
|
||||
sendQueue *execQueue
|
||||
|
||||
errCh chan error
|
||||
|
||||
// responseLock ensures that responses are queued in the same order as
|
||||
// RequestProcessed is called
|
||||
responseLock sync.Mutex
|
||||
@ -107,11 +108,10 @@ type peer struct {
|
||||
updateTime mclock.AbsTime
|
||||
frozen uint32 // 1 if client is in frozen state
|
||||
|
||||
fcClient *flowcontrol.ClientNode // nil if the peer is server only
|
||||
fcServer *flowcontrol.ServerNode // nil if the peer is client only
|
||||
fcParams flowcontrol.ServerParams
|
||||
fcCosts requestCostTable
|
||||
balanceTracker *balanceTracker // set by clientPool.connect, used and removed by serverHandler.
|
||||
fcClient *flowcontrol.ClientNode // nil if the peer is server only
|
||||
fcServer *flowcontrol.ServerNode // nil if the peer is client only
|
||||
fcParams flowcontrol.ServerParams
|
||||
fcCosts requestCostTable
|
||||
|
||||
trusted bool
|
||||
onlyAnnounce bool
|
||||
|
Reference in New Issue
Block a user