diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-05-07 02:31:48 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-05-07 02:31:48 +0300 |
commit | c8a493b9434b521b806d7db57f606817a2f82782 (patch) | |
tree | c3941aac47f5b52f2ce5f447d33096d97e21b0ba /src/server | |
parent | 0f53ef9ebfaf522499a0de89b65e975db81f802c (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.cc | 2 |
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 { |