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>
|
2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Guarded #ifdef HAVE_POSIX_FALLOCATE
|
Guarded #ifdef HAVE_POSIX_FALLOCATE
|
||||||
|
|
|
@ -574,7 +574,7 @@ bool FtpNegotiationCommand::waitConnection()
|
||||||
disableReadCheckSocket();
|
disableReadCheckSocket();
|
||||||
setReadCheckSocket(socket);
|
setReadCheckSocket(socket);
|
||||||
dataSocket.reset(serverSocket->acceptConnection());
|
dataSocket.reset(serverSocket->acceptConnection());
|
||||||
//dataSocket->setBlockingMode();
|
dataSocket->setNonBlockingMode();
|
||||||
sequence = SEQ_NEGOTIATION_COMPLETED;
|
sequence = SEQ_NEGOTIATION_COMPLETED;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ bool HttpListenCommand::execute()
|
||||||
try {
|
try {
|
||||||
if(_serverSocket->isReadable(0)) {
|
if(_serverSocket->isReadable(0)) {
|
||||||
SharedHandle<SocketCore> socket(_serverSocket->acceptConnection());
|
SharedHandle<SocketCore> socket(_serverSocket->acceptConnection());
|
||||||
|
socket->setNonBlockingMode();
|
||||||
HttpServerCommand* c =
|
HttpServerCommand* c =
|
||||||
new HttpServerCommand(_e->newCUID(), _e, socket);
|
new HttpServerCommand(_e->newCUID(), _e, socket);
|
||||||
c->setStatus(Command::STATUS_ONESHOT_REALTIME);
|
c->setStatus(Command::STATUS_ONESHOT_REALTIME);
|
||||||
|
|
Loading…
Reference in New Issue