summaryrefslogtreecommitdiff
path: root/src/HttpServerCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/HttpServerCommand.cc')
-rw-r--r--src/HttpServerCommand.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/HttpServerCommand.cc b/src/HttpServerCommand.cc
index 8ce196df..f39d2fab 100644
--- a/src/HttpServerCommand.cc
+++ b/src/HttpServerCommand.cc
@@ -107,10 +107,13 @@ HttpServerCommand::~HttpServerCommand()
void HttpServerCommand::checkSocketRecvBuffer()
{
- if (!httpServer_->getSocketRecvBuffer()->bufferEmpty()) {
- setStatus(Command::STATUS_ONESHOT_REALTIME);
- e_->setNoWait(true);
+ if (httpServer_->getSocketRecvBuffer()->bufferEmpty() &&
+ socket_->getRecvBufferedLength() == 0) {
+ return;
}
+
+ setStatus(Command::STATUS_ONESHOT_REALTIME);
+ e_->setNoWait(true);
}
#ifdef ENABLE_WEBSOCKET
@@ -172,6 +175,7 @@ bool HttpServerCommand::execute()
}
try {
if (socket_->isReadable(0) || (writeCheck_ && socket_->isWritable(0)) ||
+ socket_->getRecvBufferedLength() ||
!httpServer_->getSocketRecvBuffer()->bufferEmpty()) {
timeoutTimer_ = global::wallclock();