summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-04-11 08:28:22 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-04-11 08:28:22 +0000
commit0529e781875068e21085f4ac748eb5ee5d6085b3 (patch)
tree4e62dabcf78b1a8f84fc466f903b696bbc900f18 /src/HttpServerBodyCommand.cc
parentbf0cf1f5d955ead2a76b79bfe3f796bddee185d0 (diff)
2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use clock_gettime(CLOCK_MONOTONIC, ...) if it is available and usable to prevent from aria2 from being affected by system time change.
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
-rw-r--r--src/HttpServerBodyCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc
index 5c15a2b3..1fdbfe67 100644
--- a/src/HttpServerBodyCommand.cc
+++ b/src/HttpServerBodyCommand.cc
@@ -81,7 +81,7 @@ bool HttpServerBodyCommand::execute()
}
try {
if(_socket->isReadable(0) || _httpServer->getContentLength() == 0) {
- _timeout = global::wallclock;
+ _timeoutTimer = global::wallclock;
if(_httpServer->receiveBody()) {
// Do something for requestpath and body
@@ -108,7 +108,7 @@ bool HttpServerBodyCommand::execute()
return false;
}
} else {
- if(_timeout.difference(global::wallclock) >= 30) {
+ if(_timeoutTimer.difference(global::wallclock) >= 30) {
logger->info("HTTP request body timeout.");
return true;
} else {