فهرست منبع

Don't check readability of BitTorrent TCP socket.

Don't check readability of BitTorrent TCP socket to avoid flooding.
Tatsuhiro Tsujikawa 14 سال پیش
والد
کامیت
fee9b95db3
1فایلهای تغییر یافته به همراه1 افزوده شده و 7 حذف شده
  1. 1 7
      src/PeerListenCommand.cc

+ 1 - 7
src/PeerListenCommand.cc

@@ -61,12 +61,7 @@ PeerListenCommand::PeerListenCommand
     family_(family)
 {}
 
-PeerListenCommand::~PeerListenCommand()
-{
-  if(socket_) {
-    e_->deleteSocketForReadCheck(socket_, this);
-  }
-}
+PeerListenCommand::~PeerListenCommand() {}
 
 bool PeerListenCommand::bindPort(uint16_t& port, IntSequence& seq)
 {
@@ -86,7 +81,6 @@ bool PeerListenCommand::bindPort(uint16_t& port, IntSequence& seq)
       socket_->bind(A2STR::NIL, port, family_);
       socket_->beginListen();
       socket_->setNonBlockingMode();
-      e_->addSocketForReadCheck(socket_, this);
       A2_LOG_NOTICE(fmt("IPv%d BitTorrent: listening to port %u", ipv, port));
       return true;
     } catch(RecoverableException& ex) {