Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 <dlenski@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
dlenski authored and dwmw2 committed Dec 13, 2016
1 parent 1d84a7b commit 75d3bd9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mainloop.c
Expand Up @@ -246,6 +246,7 @@ int openconnect_mainloop(struct openconnect_info *vpninfo,
} else {
ret = -ECONNABORTED;
}
vpninfo->got_cancel_cmd = 0;
break;
}

Expand Down

0 comments on commit 75d3bd9

Please sign in to comment.