diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/HelperTasks.cc | 4 | ||||
-rw-r--r-- | src/HttpServer.cc | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/HelperTasks.cc b/src/HelperTasks.cc index ab1c2a9..074aa8d 100644 --- a/src/HelperTasks.cc +++ b/src/HelperTasks.cc @@ -21,7 +21,7 @@ void Balau::CopyTask::Do() { toread = std::min(toread, (ssize_t) COPY_BUFSIZE); m_read = m_s->read(m_buffer, toread); AAssert(m_read >= 0, "Error while reading"); - if (m_s->isEOF() || !m_read) + if (!m_read) return; m_written = 0; m_state = 1; @@ -33,6 +33,8 @@ void Balau::CopyTask::Do() { } while (m_read != m_written); m_state = 0; m_current += m_read; + if (m_s->isEOF()) + return; } } } diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 8eea5bb..921da3b 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -559,6 +559,7 @@ bool Balau::HttpWorker::handleClient() { auto f = m_server->findAction(uri.to_charp(), host.to_charp()); if (f.action) { + setOkayToEAgain(false); m_strm->detach(); IO<OutputCheck> out(new OutputCheck(m_socket)); Http::Request req; |