2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Avoid slow seeding
	* src/PeerInteractionCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-11-13 15:39:22 +00:00
parent 586b63fdbd
commit c0197f1040
2 changed files with 11 additions and 6 deletions

View File

@ -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>
Updated usage for -i option.

View File

@ -249,7 +249,8 @@ bool PeerInteractionCommand::executeInternal() {
}
case WIRED:
// See the comment for writable check below.
// disableWriteCheckSocket();
disableWriteCheckSocket();
btInteractive->doInteractionProcessing();
if(btInteractive->countReceivedMessageInIteration() > 0) {
updateKeepAlive();
@ -258,11 +259,10 @@ bool PeerInteractionCommand::executeInternal() {
(peer->getLatency() < 1500)) ||
(peer->peerInterested() && !peer->amChoking())) {
// Writable check causes CPU usage high because socket becomes writable
// instantly. So don't do it.
// if(btInteractive->isSendingMessageInProgress()) {
// setWriteCheckSocket(socket);
// }
// Writable check to avoid slow seeding
if(btInteractive->isSendingMessageInProgress()) {
setWriteCheckSocket(socket);
}
if(maxDownloadSpeedLimit > 0) {
TransferStat stat = _requestGroup->calculateStat();