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