From 75d3bd936b2cd95d6337c6a043507d3900436f35 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Fri, 14 Oct 2016 18:46:34 -0700 Subject: [PATCH] Unset got_cancel_cmd after reacting to it, as is already done for got_pause_cmd MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Per David Woodhouse (http://lists.infradead.org/pipermail/openconnect-devel/2016-October/004034.html): > I think it's probably OK to set vpninfo->got_cancel_cmd=0 in the mainloop > right before calling proto->vpn_close_session. If we get cancelled > *again* then we'll give up on that too. Without this fix, do_https_request() can't be used to close the session — it interrupts itself as soon as it sees that got_cancel_cmd is set. Signed-off-by: Daniel Lenski Signed-off-by: David Woodhouse --- mainloop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mainloop.c b/mainloop.c index 6a1e7d65..efe493a1 100644 --- a/mainloop.c +++ b/mainloop.c @@ -246,6 +246,7 @@ int openconnect_mainloop(struct openconnect_info *vpninfo, } else { ret = -ECONNABORTED; } + vpninfo->got_cancel_cmd = 0; break; } -- 2.49.0