mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 01:47:58 +02:00
vpn: make DOWN dispatcher action block on quit
Since the event loop isn't running on quit, but we want to ensure that scripts can fully process the DOWN event, block on scripts completing when disconnecting the VPN when quitting.
This commit is contained in:
parent
e1ec6a5173
commit
beb5529c42
1 changed files with 18 additions and 9 deletions
|
|
@ -373,15 +373,24 @@ _set_vpn_state (NMVPNConnection *connection,
|
|||
if ( old_vpn_state >= STATE_ACTIVATED
|
||||
&& old_vpn_state <= STATE_DEACTIVATING) {
|
||||
/* Let dispatcher scripts know we're about to go down */
|
||||
nm_dispatcher_call_vpn (DISPATCHER_ACTION_VPN_DOWN,
|
||||
priv->connection,
|
||||
parent_dev,
|
||||
priv->ip_iface,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
if (quitting) {
|
||||
nm_dispatcher_call_vpn_sync (DISPATCHER_ACTION_VPN_DOWN,
|
||||
priv->connection,
|
||||
parent_dev,
|
||||
priv->ip_iface,
|
||||
NULL,
|
||||
NULL);
|
||||
} else {
|
||||
nm_dispatcher_call_vpn (DISPATCHER_ACTION_VPN_DOWN,
|
||||
priv->connection,
|
||||
parent_dev,
|
||||
priv->ip_iface,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Tear down and clean up the connection */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue