summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-05-07 02:31:48 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-05-07 02:31:48 +0300
commitc8a493b9434b521b806d7db57f606817a2f82782 (patch)
treec3941aac47f5b52f2ce5f447d33096d97e21b0ba /src/server
parent0f53ef9ebfaf522499a0de89b65e975db81f802c (diff)
server: remove cached items on timeout (makes sense in case of error that might happen next)
Diffstat (limited to 'src/server')
-rw-r--r--src/server/server.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/server.cc b/src/server/server.cc
index 981104d..ab1db9e 100644
--- a/src/server/server.cc
+++ b/src/server/server.cc
@@ -117,6 +117,8 @@ std::shared_ptr<p18::response_type::BaseResponse> Server::executeCommand(p18::Co
if (voltronic::timestamp() - cr.time <= cacheTimeout_) {
return cr.response;
}
+
+ cache_.erase(it);
}
try {