Transmission does not reject cancelled requests
This commit is contained in:
parent
388bfafa01
commit
96ef73aeb6
|
@ -648,7 +648,9 @@ func (me *PeerConn) _cancel(r RequestIndex) bool {
|
|||
// Already cancelled and waiting for a response.
|
||||
return true
|
||||
}
|
||||
if me.fastEnabled() {
|
||||
// Transmission does not send rejects for received cancels. See
|
||||
// https://github.com/transmission/transmission/pull/2275.
|
||||
if me.fastEnabled() && !me.remoteIsTransmission() {
|
||||
me.cancelledRequests.Add(r)
|
||||
} else {
|
||||
if !me.deleteRequest(r) {
|
||||
|
@ -1688,3 +1690,7 @@ func (p *Peer) TryAsPeerConn() (*PeerConn, bool) {
|
|||
func (pc *PeerConn) isLowOnRequests() bool {
|
||||
return pc.actualRequestState.Requests.IsEmpty()
|
||||
}
|
||||
|
||||
func (pc *PeerConn) remoteIsTransmission() bool {
|
||||
return bytes.HasPrefix(pc.PeerID[:], []byte("-TR")) && pc.PeerID[7] == '-'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue