2008-09-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Made a socket of incoming peer non-blocking.
	* src/PeerListenCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-09-28 11:13:20 +00:00
parent 4f280af10b
commit c1dd780b95
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-09-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made a socket of incoming peer non-blocking.
* src/PeerListenCommand.cc
2008-09-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that aria2 may send duplicate data to BitTorrent peer if

View File

@ -97,9 +97,7 @@ bool PeerListenCommand::execute() {
std::pair<std::string, uint16_t> peerInfo;
peerSocket->getPeerInfo(peerInfo);
// Since peerSocket may be in non-blocking mode, make it blocking mode
// here.
//peerSocket->setBlockingMode();
peerSocket->setNonBlockingMode();
PeerHandle peer(new Peer(peerInfo.first, peerInfo.second, true));
int32_t cuid = CUIDCounterSingletonHolder::instance()->newID();