With commit ea66a2b5c.. openvpn restarts instead of terminate on suspend. This conflicts with the stop/restart logic in the gui during windows power state change events. Here we change the default behaviour so that SIGTERM is not triggered during windows suspend.
Requires the installer to update the registry during an upgrade of exisitng installations, or notify the end user of the change in the default value of disconnect_on_suspend (0). Signed-off-by: Selva Nair <selva.n...@gmail.com> --- registry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry.c b/registry.c index f96827a..16af368 100644 --- a/registry.c +++ b/registry.c @@ -111,7 +111,7 @@ GetRegistryKeys() if (!GetRegKey(_T("show_script_window"), o.show_script_window, _T("1"), _countof(o.show_script_window))) return(false); - if (!GetRegKey(_T("disconnect_on_suspend"), o.disconnect_on_suspend, _T("1"), + if (!GetRegKey(_T("disconnect_on_suspend"), o.disconnect_on_suspend, _T("0"), _countof(o.disconnect_on_suspend))) return(false); if (!GetRegKey(_T("passphrase_attempts"), o.psw_attempts_string, _T("3"), -- 2.6.2