2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Moved the call setWriteCheckSocket inside the previous clause to 
reduce
	the number of socket to watch out.
	* src/PeerInteractionCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-06-16 16:06:24 +00:00
parent 1c2dd30bf7
commit 067aa16499
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2008-06-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Moved the call setWriteCheckSocket inside the previous clause to reduce
the number of socket to watch out.
* src/PeerInteractionCommand.cc
2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
When there is not enough space in disk when writing a chunk of data,

View File

@ -230,6 +230,11 @@ bool PeerInteractionCommand::executeInternal() {
}
if((peer->amInterested() && !peer->peerChoking() && (peer->getLatency() < 1500)) ||
(peer->peerInterested() && !peer->amChoking())) {
if(btInteractive->isSendingMessageInProgress()) {
setWriteCheckSocket(socket);
}
if(maxDownloadSpeedLimit > 0) {
TransferStat stat = peerStorage->calculateStat();
if(maxDownloadSpeedLimit < stat.downloadSpeed) {
@ -244,9 +249,6 @@ bool PeerInteractionCommand::executeInternal() {
} else {
disableReadCheckSocket();
}
if(btInteractive->isSendingMessageInProgress()) {
setWriteCheckSocket(socket);
}
break;
}
if(btInteractive->countPendingMessage() > 0) {