From 278b0c57148b3a7f15c9a11338aa72f54db0f4df Mon Sep 17 00:00:00 2001 From: PobreGato <315121269+pobregat0@users.noreply.github.com> Date: Mon, 10 Aug 2026 12:02:49 +0300 Subject: [PATCH] don't add config options twice on repeated Init --- libi2pd/Config.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libi2pd/Config.cpp b/libi2pd/Config.cpp index bfda5db6..e7e58321 100644 --- a/libi2pd/Config.cpp +++ b/libi2pd/Config.cpp @@ -40,6 +40,13 @@ namespace config { void Init() { + // register options once, they never change; drop stored values because + // store() keeps the ones set by a previous Init + m_Options.clear(); + static bool optionsRegistered = false; + if (optionsRegistered) return; + optionsRegistered = true; + options_description general("General options"); general.add_options() ("help", "Show this message")