mirror of https://github.com/aria2/aria2
Don't check readability of BitTorrent TCP socket.
Don't check readability of BitTorrent TCP socket to avoid flooding.pull/2/head
parent
79c59dcbf4
commit
fee9b95db3
|
@ -61,12 +61,7 @@ PeerListenCommand::PeerListenCommand
|
||||||
family_(family)
|
family_(family)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
PeerListenCommand::~PeerListenCommand()
|
PeerListenCommand::~PeerListenCommand() {}
|
||||||
{
|
|
||||||
if(socket_) {
|
|
||||||
e_->deleteSocketForReadCheck(socket_, this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PeerListenCommand::bindPort(uint16_t& port, IntSequence& seq)
|
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_->bind(A2STR::NIL, port, family_);
|
||||||
socket_->beginListen();
|
socket_->beginListen();
|
||||||
socket_->setNonBlockingMode();
|
socket_->setNonBlockingMode();
|
||||||
e_->addSocketForReadCheck(socket_, this);
|
|
||||||
A2_LOG_NOTICE(fmt("IPv%d BitTorrent: listening to port %u", ipv, port));
|
A2_LOG_NOTICE(fmt("IPv%d BitTorrent: listening to port %u", ipv, port));
|
||||||
return true;
|
return true;
|
||||||
} catch(RecoverableException& ex) {
|
} catch(RecoverableException& ex) {
|
||||||
|
|
Loading…
Reference in New Issue