delay_tunnel_reason and delay_close
This is becoming one of the more complicated and interesting parts of the PPP branch.
Factored out into a separate feature branch because I think it deserves separate consideration.
Adding these appears to have several advantages:
- Much clearer diagnostics when something goes wrong in the connection process, since openconnect won't background itself until the tunnel is up. See 557ac6cf commit message for examples.
- Predictable timing of when
openconnect -b
will exit, when run in a script. Tunnel is guaranteed to be up before subsequent commands may run and try to use the tunnel (see #117). - Predictable timing of when
openconnect
will call thevpnc-script
withreason=connect
(see #117).
Edited by Daniel Lenski