// 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) {
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] == '-'
+}