Browse Source

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
Selva Nair 2 years ago
parent
commit
13dd35ef61
  1. 3
      openvpn.c

3
openvpn.c

@ -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…
Cancel
Save