Simplify fix: only add isInt() check in refresh methods
Changed approach per maintainer feedback - instead of caching signal values, just add isInt() check before accessing config_["signal"].asInt() in refresh() methods. This is simpler and more minimal. Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
This commit is contained in:
@ -42,7 +42,6 @@ class Custom : public ALabel {
|
||||
int pid_;
|
||||
util::command::res output_;
|
||||
util::JsonParser parser_;
|
||||
int signal_; // Cached signal value (-1 = disabled) to avoid JSON access in signal handler
|
||||
|
||||
util::SleeperThread thread_;
|
||||
};
|
||||
|
||||
@ -33,7 +33,6 @@ class Image : public AModule {
|
||||
int size_;
|
||||
std::chrono::milliseconds interval_;
|
||||
util::command::res output_;
|
||||
int signal_; // Cached signal value (-1 = disabled) to avoid JSON access in signal handler
|
||||
|
||||
util::SleeperThread thread_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user