From: Daniel Lenski Date: Sat, 15 Oct 2016 01:46:34 +0000 (-0700) Subject: Unset got_cancel_cmd after reacting to it, as is already done for got_pause_cmd X-Git-Tag: v7.08~5 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=75d3bd936b2cd95d6337c6a043507d3900436f35;p=users%2Fdwmw2%2Fopenconnect.git Unset got_cancel_cmd after reacting to it, as is already done for got_pause_cmd 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 --- 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; }