Fix busy loop when upload rate limit hits

pull/675/head
Tatsuhiro Tsujikawa 2016-06-06 23:41:33 +09:00
parent ae6067d2a9
commit 887f7a6b90
1 changed files with 6 additions and 2 deletions

View File

@ -360,8 +360,12 @@ bool PeerInteractionCommand::executeInternal()
break; break;
} }
} }
if (btInteractive_->countPendingMessage() > 0 || if ((btInteractive_->countPendingMessage() > 0 ||
btInteractive_->isSendingMessageInProgress()) { btInteractive_->isSendingMessageInProgress()) &&
!getDownloadEngine()
->getRequestGroupMan()
->doesOverallUploadSpeedExceed() &&
!requestGroup_->doesUploadSpeedExceed()) {
setWriteCheckSocket(getSocket()); setWriteCheckSocket(getSocket());
} }
else { else {