Fix initial connection when launch new instance of Manager

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
Vitalii Koshura 2018-10-15 22:25:41 +03:00
parent e26acd5c11
commit ebca06234a
No known key found for this signature in database
GPG Key ID: CE0DB1726070A5A3
1 changed files with 9 additions and 8 deletions

View File

@ -586,14 +586,15 @@ int CMainDocument::OnPoll() {
pFrame->OnExit(event); // Exit if Select Computer dialog cancelled
}
}
if (wxGetApp().GetNeedRunDaemon()) {
if (m_pClientManager->StartupBOINCCore()) {
Connect(wxT("localhost"), portNum, password, TRUE, TRUE);
}
else {
m_pNetworkConnection->ForceDisconnect();
pFrame->ShowDaemonStartFailedAlert();
}
}
if (wxGetApp().GetNeedRunDaemon() && IsComputerNameLocal(hostName)) {
if (m_pClientManager->StartupBOINCCore()) {
Connect(wxT("localhost"), portNum, password, TRUE, TRUE);
}
else {
m_pNetworkConnection->ForceDisconnect();
pFrame->ShowDaemonStartFailedAlert();
}
} else {
Connect(hostName, portNum, password, TRUE, password.IsEmpty());