mirror of https://github.com/aria2/aria2
2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made accepted socket non-block. * src/FtpNegotiationCommand.cc * src/HttpListenCommand.ccpull/1/head
parent
6cbb6d2850
commit
3531d57d37
|
@ -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…
Reference in New Issue