Browse Source

2009-11-18 Tatsuhiro Tsujikawa <[email protected]>

	Check socket for reading if there are outstanding requests.
	* src/PeerInteractionCommand.cc
Tatsuhiro Tsujikawa 16 years ago
parent
commit
2f6e22f1aa
2 changed files with 7 additions and 2 deletions
  1. 5 0
      ChangeLog
  2. 2 2
      src/PeerInteractionCommand.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2009-11-18  Tatsuhiro Tsujikawa  <[email protected]>
+
+	Check socket for reading if there are outstanding requests.
+	* src/PeerInteractionCommand.cc
+
 2009-11-17  Tatsuhiro Tsujikawa  <[email protected]>
 
 	Moved frequently called methods to header file so they get

+ 2 - 2
src/PeerInteractionCommand.cc

@@ -257,8 +257,8 @@ bool PeerInteractionCommand::executeInternal() {
     if(btInteractive->countReceivedMessageInIteration() > 0) {
       updateKeepAlive();
     }
-    if((peer->amInterested() && !peer->peerChoking() &&
-	(peer->getLatency() < 1500)) ||
+    if((peer->amInterested() && !peer->peerChoking()) ||
+       btInteractive->countOutstandingRequest() ||
        (peer->peerInterested() && !peer->amChoking())) {
 
       // Writable check to avoid slow seeding