mirror of
https://github.com/aria2/aria2.git
synced 2025-01-08 11:01:38 +00:00
Process as many messages as possible in recv buffer
This commit is contained in:
parent
e816c5eee4
commit
3620d271af
@ -83,7 +83,7 @@ bool DHTInteractionCommand::execute()
|
||||
|
||||
taskQueue_->executeTask();
|
||||
|
||||
for(size_t i = 0; i < 20; ++i) {
|
||||
while(1) {
|
||||
SharedHandle<DHTMessage> m = receiver_->receiveMessage();
|
||||
if(!m) {
|
||||
break;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user