diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-06-06 23:41:33 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-06-06 23:41:33 +0900 |
| commit | 887f7a6b90edca2215f2a86cb745b3ffff4ba2b6 (patch) | |
| tree | 7ead14640352706709cbee3b3e3a4273e6954b72 /src | |
| parent | ae6067d2a9b701b3059ff28c5bff190ec0ad6474 (diff) | |
Fix busy loop when upload rate limit hits
Diffstat (limited to 'src')
| -rw-r--r-- | src/PeerInteractionCommand.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/PeerInteractionCommand.cc b/src/PeerInteractionCommand.cc index cfcd5d4d..b10fb3ce 100644 --- a/src/PeerInteractionCommand.cc +++ b/src/PeerInteractionCommand.cc @@ -360,8 +360,12 @@ bool PeerInteractionCommand::executeInternal() break; } } - if (btInteractive_->countPendingMessage() > 0 || - btInteractive_->isSendingMessageInProgress()) { + if ((btInteractive_->countPendingMessage() > 0 || + btInteractive_->isSendingMessageInProgress()) && + !getDownloadEngine() + ->getRequestGroupMan() + ->doesOverallUploadSpeedExceed() && + !requestGroup_->doesUploadSpeedExceed()) { setWriteCheckSocket(getSocket()); } else { |
