When updating requests, only tickle writer if there are no requests pending
Just a quick attempt to reduce load for now. There'll be a much better way to do this.
This commit is contained in:
parent
21358ba458
commit
cd49f75cb9
|
@ -653,6 +653,9 @@ func (cn *PeerConn) postBitfield() {
|
|||
}
|
||||
|
||||
func (cn *PeerConn) updateRequests() {
|
||||
if len(cn.actualRequestState.Requests) != 0 {
|
||||
return
|
||||
}
|
||||
cn.tickleWriter()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue