Public Access
IRC: edit server settings as a draft, applied under the service lock
The IRC App edited the live config while the IRC task could be reading it to connect. The App now edits a copy; applyConfig() validates it and swaps it in under the lock, and the task connects from a snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
@@ -44,9 +44,10 @@ class IrcService : public Service {
|
||||
}
|
||||
int totalUnread();
|
||||
|
||||
IrcConfig& config() { return config_; }
|
||||
// Saves the config and, if running, reconnects with it (a fresh session).
|
||||
std::string saveConfig();
|
||||
// A copy of the server settings to edit; applyConfig() validates, saves and, if running,
|
||||
// reconnects with it (a fresh session).
|
||||
IrcConfig draftConfig();
|
||||
std::string applyConfig(const IrcConfig& draft);
|
||||
|
||||
private:
|
||||
struct Lock {
|
||||
|
||||
Reference in New Issue
Block a user