From a2e133a11fc7e91f18bf23723a975bf69fb218db Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 22 May 2021 23:43:16 +0300 Subject: server: add --device-error-limit --- src/server/server.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/server/server.h') diff --git a/src/server/server.h b/src/server/server.h index dc24ee8..705503f 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -44,6 +44,8 @@ private: u64 cacheTimeout_; u64 delay_; u64 endExecutionTime_; + u32 deviceErrorLimit_; + u32 deviceErrorCounter_; std::map cache_; std::mutex threads_mutex_; @@ -53,6 +55,8 @@ private: public: static const u64 CACHE_TIMEOUT = 1000; + static const u32 DEVICE_ERROR_LIMIT = 10; + static const u64 DELAY = 0; volatile std::atomic sigCaught = 0; @@ -62,6 +66,8 @@ public: void setVerbose(bool verbose); void setCacheTimeout(u64 timeout); void setDelay(u64 delay); + void setDeviceErrorLimit(u32 deviceErrorLimit); + void start(std::string& host, int port); bool verbose() const { return verbose_; } -- cgit v1.2.3