mirror of https://github.com/OpenVPN/openvpn-gui
Only change to reconnecting when already connected
parent
a9128787eb
commit
5885c906db
|
@ -324,14 +324,21 @@ OnStateChange(connection_t *c, char *data)
|
||||||
c->failed_psw_attempts++;
|
c->failed_psw_attempts++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We change the state to reconnecting only if there was a prior successful connection.
|
||||||
|
if (c->state == connected)
|
||||||
|
{
|
||||||
c->state = reconnecting;
|
c->state = reconnecting;
|
||||||
|
|
||||||
|
// Update the tray icon
|
||||||
CheckAndSetTrayIcon();
|
CheckAndSetTrayIcon();
|
||||||
|
|
||||||
|
// And the texts in the status window
|
||||||
SetDlgItemText(c->hwndStatus, ID_TXT_STATUS, LoadLocalizedString(IDS_NFO_STATE_RECONNECTING));
|
SetDlgItemText(c->hwndStatus, ID_TXT_STATUS, LoadLocalizedString(IDS_NFO_STATE_RECONNECTING));
|
||||||
SetDlgItemTextW(c->hwndStatus, ID_TXT_IP, L"");
|
SetDlgItemTextW(c->hwndStatus, ID_TXT_IP, L"");
|
||||||
SetStatusWinIcon(c->hwndStatus, ID_ICO_CONNECTING);
|
SetStatusWinIcon(c->hwndStatus, ID_ICO_CONNECTING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SimulateButtonPress(HWND hwnd, UINT btn)
|
SimulateButtonPress(HWND hwnd, UINT btn)
|
||||||
|
|
Loading…
Reference in New Issue