mirror of https://github.com/aria2/aria2
Fix bug returnPeer is not called if sequence_ == INITIATOR_SEND_KEY
In InitiatorMSEHandshakeCommand, when aborting connection, we must return peer to the PeerStorage. But it is not done if sequence_ is INITIATOR_SEND_KEY. This causes stale Peer objects whose usedBy() returns true eventually occupies peer list and aria2 cannot make any connections.pull/43/head
parent
32a3c441af
commit
550ac8c074
|
@ -238,7 +238,8 @@ bool InitiatorMSEHandshakeCommand::prepareForNextPeer(time_t wait)
|
|||
|
||||
void InitiatorMSEHandshakeCommand::onAbort()
|
||||
{
|
||||
if(getOption()->getAsBool(PREF_BT_REQUIRE_CRYPTO)) {
|
||||
if(sequence_ == INITIATOR_SEND_KEY ||
|
||||
getOption()->getAsBool(PREF_BT_REQUIRE_CRYPTO)) {
|
||||
peerStorage_->returnPeer(getPeer());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue