mirror of https://github.com/aria2/aria2
2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Avoid slow seeding * src/PeerInteractionCommand.ccpull/1/head
parent
586b63fdbd
commit
c0197f1040
|
@ -1,3 +1,8 @@
|
||||||
|
2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Avoid slow seeding
|
||||||
|
* src/PeerInteractionCommand.cc
|
||||||
|
|
||||||
2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Updated usage for -i option.
|
Updated usage for -i option.
|
||||||
|
|
|
@ -249,7 +249,8 @@ bool PeerInteractionCommand::executeInternal() {
|
||||||
}
|
}
|
||||||
case WIRED:
|
case WIRED:
|
||||||
// See the comment for writable check below.
|
// See the comment for writable check below.
|
||||||
// disableWriteCheckSocket();
|
disableWriteCheckSocket();
|
||||||
|
|
||||||
btInteractive->doInteractionProcessing();
|
btInteractive->doInteractionProcessing();
|
||||||
if(btInteractive->countReceivedMessageInIteration() > 0) {
|
if(btInteractive->countReceivedMessageInIteration() > 0) {
|
||||||
updateKeepAlive();
|
updateKeepAlive();
|
||||||
|
@ -258,11 +259,10 @@ bool PeerInteractionCommand::executeInternal() {
|
||||||
(peer->getLatency() < 1500)) ||
|
(peer->getLatency() < 1500)) ||
|
||||||
(peer->peerInterested() && !peer->amChoking())) {
|
(peer->peerInterested() && !peer->amChoking())) {
|
||||||
|
|
||||||
// Writable check causes CPU usage high because socket becomes writable
|
// Writable check to avoid slow seeding
|
||||||
// instantly. So don't do it.
|
if(btInteractive->isSendingMessageInProgress()) {
|
||||||
// if(btInteractive->isSendingMessageInProgress()) {
|
setWriteCheckSocket(socket);
|
||||||
// setWriteCheckSocket(socket);
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
if(maxDownloadSpeedLimit > 0) {
|
if(maxDownloadSpeedLimit > 0) {
|
||||||
TransferStat stat = _requestGroup->calculateStat();
|
TransferStat stat = _requestGroup->calculateStat();
|
||||||
|
|
Loading…
Reference in New Issue