From c8a493b9434b521b806d7db57f606817a2f82782 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Fri, 7 May 2021 02:31:48 +0300 Subject: server: remove cached items on timeout (makes sense in case of error that might happen next) --- src/server/server.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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 Server::executeCommand(p18::Co if (voltronic::timestamp() - cr.time <= cacheTimeout_) { return cr.response; } + + cache_.erase(it); } try { -- cgit v1.2.3