mirror of https://github.com/aria2/aria2
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Try to keep the ordering of outgoing piece message. * src/DefaultBtMessageDispatcher.cc (DefaultBtMessageDispatcher::sendMessages)pull/1/head
parent
bc5319081b
commit
20f5fcfc0f
|
@ -1,3 +1,9 @@
|
||||||
|
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Try to keep the ordering of outgoing piece message.
|
||||||
|
* src/DefaultBtMessageDispatcher.cc
|
||||||
|
(DefaultBtMessageDispatcher::sendMessages)
|
||||||
|
|
||||||
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Fixed busy loop when error/hup epoll events occur.
|
Fixed busy loop when error/hup epoll events occur.
|
||||||
|
|
|
@ -98,7 +98,17 @@ void DefaultBtMessageDispatcher::sendMessages() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
messageQueue.insert(messageQueue.end(), tempQueue.begin(), tempQueue.end());
|
if(!tempQueue.empty()) {
|
||||||
|
// Insert pending message to the front, so that message is likely sent in
|
||||||
|
// the same order as it is queued.
|
||||||
|
if(!messageQueue.empty() && messageQueue.front()->isSendingInProgress()) {
|
||||||
|
messageQueue.insert(messageQueue.begin()+1,
|
||||||
|
tempQueue.begin(), tempQueue.end());
|
||||||
|
} else {
|
||||||
|
messageQueue.insert(messageQueue.begin(),
|
||||||
|
tempQueue.begin(), tempQueue.end());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class HandleEvent {
|
class HandleEvent {
|
||||||
|
|
Loading…
Reference in New Issue