From efbbdbf9314d989fa2596b0cb4f202b61c39bd9e Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Tue, 8 Dec 2020 14:16:19 -0800 Subject: [PATCH] include quit_reason in exit message Signed-off-by: Daniel Lenski --- main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 7978af22..e662b358 100644 --- a/main.c +++ b/main.c @@ -2094,7 +2094,10 @@ int main(int argc, char **argv) ret = 1; break; default: - vpn_progress(vpninfo, PRG_ERR, _("Unknown error; exiting.\n")); + if (vpninfo->quit_reason) + vpn_progress(vpninfo, PRG_ERR, "%s; exiting\n", vpninfo->quit_reason); + else + vpn_progress(vpninfo, PRG_ERR, _("Unknown error; exiting.\n")); ret = 1; break; }