mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 14:07:37 +03:00
2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made accepted socket non-block. * src/FtpNegotiationCommand.cc * src/HttpListenCommand.cc
This commit is contained in:
parent
6cbb6d2850
commit
3531d57d37
3 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Made accepted socket non-block.
|
||||
* src/FtpNegotiationCommand.cc
|
||||
* src/HttpListenCommand.cc
|
||||
|
||||
2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Guarded #ifdef HAVE_POSIX_FALLOCATE
|
||||
|
|
|
@ -574,7 +574,7 @@ bool FtpNegotiationCommand::waitConnection()
|
|||
disableReadCheckSocket();
|
||||
setReadCheckSocket(socket);
|
||||
dataSocket.reset(serverSocket->acceptConnection());
|
||||
//dataSocket->setBlockingMode();
|
||||
dataSocket->setNonBlockingMode();
|
||||
sequence = SEQ_NEGOTIATION_COMPLETED;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ bool HttpListenCommand::execute()
|
|||
try {
|
||||
if(_serverSocket->isReadable(0)) {
|
||||
SharedHandle<SocketCore> socket(_serverSocket->acceptConnection());
|
||||
socket->setNonBlockingMode();
|
||||
HttpServerCommand* c =
|
||||
new HttpServerCommand(_e->newCUID(), _e, socket);
|
||||
c->setStatus(Command::STATUS_ONESHOT_REALTIME);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue