diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-06-08 02:03:31 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-06-09 02:05:34 +0900 |
| commit | 99cd73c0926f0c07d27777fde2f15816e8040030 (patch) | |
| tree | 7c6a077b0590c49029c76686afb9c2ab1d00bb6d /src/HttpServerBodyCommand.cc | |
| parent | 2874f6ab095a30a4d297cdc85fa3730bec41b1c2 (diff) | |
Replace timer facility with chrono lib
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
| -rw-r--r-- | src/HttpServerBodyCommand.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index 8f5cac16..7fb715c2 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -148,8 +148,8 @@ void HttpServerBodyCommand::addHttpServerResponseCommand(bool delayed) auto resp = make_unique<HttpServerResponseCommand>(getCuid(), httpServer_, e_, socket_); if (delayed) { - e_->addCommand( - make_unique<DelayedCommand>(getCuid(), e_, 1, std::move(resp), true)); + e_->addCommand(make_unique<DelayedCommand>( + getCuid(), e_, std::chrono::seconds(1), std::move(resp), true)); return; } @@ -320,7 +320,8 @@ bool HttpServerBodyCommand::execute() return false; } } else { - if(timeoutTimer_.difference(global::wallclock()) >= 30) { + if(timeoutTimer_.difference(global::wallclock()) >= + std::chrono::seconds(30)) { A2_LOG_INFO("HTTP request body timeout."); return true; } else { |
