mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-08-28 09:34:16 +00:00
Merge pull request #2466 from pobregat0/config-init-twice
don't add config options twice on repeated Init
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user