mirror of
https://github.com/aria2/aria2.git
synced 2026-04-13 08:18:46 +00:00
2008-09-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made a socket of incoming peer non-blocking. * src/PeerListenCommand.cc
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user