mirror of https://github.com/OpenVPN/openvpn-gui
Bugfix for management-timeout patch
PR 418 introduced repeatedly trying to connect to the management interface on timeout. User can exit out of this loop by "disconnect", but for this to work an explict call to OnStop() is required. Normally OnStop() is triggered by management disconnect which won't happen if not connected in the first place. Also call OnStop() on all iservice errors instead of waiting for management timeout which may never happen. Signed-off-by: Selva Nair <selva.nair@gmail.com>pull/561/head
parent
5ea0b4319f
commit
13dd35ef61
|
@ -1709,7 +1709,7 @@ OnService(connection_t *c, UNUSED char *msg)
|
|||
OnStop(c, NULL);
|
||||
break;
|
||||
default:
|
||||
/* Unknown failure: let management connection timeout */
|
||||
OnStop(c, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2065,6 +2065,7 @@ StatusDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
/* openvpn failed to respond to stop signal -- terminate */
|
||||
TerminateOpenVPN(c);
|
||||
KillTimer (hwndDlg, IDT_STOP_TIMER);
|
||||
OnStop(c, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue