summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-23 00:32:02 -0800
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-12-23 00:32:02 -0800
commite977ca1e5f6a10bab7af8b2736591f709783566f (patch)
treed6bba8b988373bb73dc1e6e4f3fb66ae28c4b7c5 /src
parenta12275a467c72ff429af64e477ba1e3bad3d6d79 (diff)
Few minor fixes...
Diffstat (limited to 'src')
-rw-r--r--src/HelperTasks.cc4
-rw-r--r--src/HttpServer.cc1
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;