2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Made accepted socket non-block.
	* src/FtpNegotiationCommand.cc
	* src/HttpListenCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-03-28 13:19:47 +00:00
parent 6cbb6d2850
commit 3531d57d37
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -574,7 +574,7 @@ bool FtpNegotiationCommand::waitConnection()
disableReadCheckSocket();
setReadCheckSocket(socket);
dataSocket.reset(serverSocket->acceptConnection());
//dataSocket->setBlockingMode();
dataSocket->setNonBlockingMode();
sequence = SEQ_NEGOTIATION_COMPLETED;
return false;
}

View File

@ -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);