diff --git a/src/DHTInteractionCommand.cc b/src/DHTInteractionCommand.cc index ff17a8a6..f98e4699 100644 --- a/src/DHTInteractionCommand.cc +++ b/src/DHTInteractionCommand.cc @@ -83,7 +83,7 @@ bool DHTInteractionCommand::execute() taskQueue_->executeTask(); - for(size_t i = 0; i < 20; ++i) { + while(1) { SharedHandle m = receiver_->receiveMessage(); if(!m) { break; diff --git a/src/DefaultBtInteractive.cc b/src/DefaultBtInteractive.cc index b70bb330..cb2530e8 100644 --- a/src/DefaultBtInteractive.cc +++ b/src/DefaultBtInteractive.cc @@ -274,7 +274,7 @@ void DefaultBtInteractive::sendKeepAlive() { size_t DefaultBtInteractive::receiveMessages() { size_t countOldOutstandingRequest = dispatcher_->countOutstandingRequest(); size_t msgcount = 0; - for(int i = 0; i < UB_MAX_OUTSTANDING_REQUEST+50; ++i) { + while(1) { if(requestGroupMan_->doesOverallDownloadSpeedExceed() || downloadContext_->getOwnerRequestGroup()->doesDownloadSpeedExceed()) { break;