From 86b4fc19a4e758f42a6afefc815cede308b8683d Mon Sep 17 00:00:00 2001 From: Jaben Cargman Date: Mon, 21 Mar 2022 16:17:34 -0400 Subject: [PATCH 1/2] Oops -- SERVER isn't used, only service. --- src/Papercut.Service/Papercut.Service.Settings.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Papercut.Service/Papercut.Service.Settings.json b/src/Papercut.Service/Papercut.Service.Settings.json index 1b117550..3e7b0f00 100644 --- a/src/Papercut.Service/Papercut.Service.Settings.json +++ b/src/Papercut.Service/Papercut.Service.Settings.json @@ -7,12 +7,6 @@ "HttpServerEnabled_Description": "## Is the Papercut Web UI Server enabled (Defaults to true)?", "IP": "Any", "IP_Description": "## SMTP Server listening IP. 'Any' is the default and it means '0.0.0.0'.", - "IPCommServerIPAddress": "127.0.0.1", - "IPCommServerIPAddress_Description": "## The IP Comm Server IP address (Defaults to 127.0.0.1).", - "IPCommServerPort": "37403", - "IPCommServerPort_Description": "## The IP Comm Server listening port (Defaults to 37403).", - "IPCommServerUIPort": "37402", - "IPCommServerUIPort_Description": "## The IP Comm Server UI listening port (Defaults to 37402).", "IPCommServiceAddress": "127.0.0.1", "IPCommServiceAddress_Description": "## The IP Comm Service IP address (Defaults to 127.0.0.1).", "IPCommServicePort": "37403", From fc7431d5742c97d650999fc3fe639d246d42468c Mon Sep 17 00:00:00 2001 From: Jaben Cargman Date: Mon, 21 Mar 2022 18:47:54 -0400 Subject: [PATCH 2/2] Don't bother saving on exit -- not useful. --- .../Infrastructure/Container/PapercutCoreModule.cs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Papercut.Core/Infrastructure/Container/PapercutCoreModule.cs b/src/Papercut.Core/Infrastructure/Container/PapercutCoreModule.cs index c18ee9a9..f5198769 100644 --- a/src/Papercut.Core/Infrastructure/Container/PapercutCoreModule.cs +++ b/src/Papercut.Core/Infrastructure/Container/PapercutCoreModule.cs @@ -62,17 +62,9 @@ protected override void Load(ContainerBuilder builder) try { j.Instance.Load(); - } - catch - { - } - }) - .OnRelease( - j => - { - try - { - j.Save(); + + // immediately save all settings + j.Instance.Save(); } catch {