mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
removed unused disconnectFromHost() from ServerController
This commit is contained in:
@@ -839,12 +839,6 @@ void ServerController::setCancelInstallation(const bool cancel)
|
||||
m_cancelInstallation = cancel;
|
||||
}
|
||||
|
||||
void ServerController::disconnectFromHost(const ServerCredentials &credentials)
|
||||
{
|
||||
// SshConnection *client = acquireConnection(sshParams(credentials));
|
||||
// if (client) client->disconnectFromHost();
|
||||
}
|
||||
|
||||
ErrorCode ServerController::setupServerFirewall(const ServerCredentials &credentials)
|
||||
{
|
||||
return runScript(credentials,
|
||||
|
||||
@@ -31,7 +31,6 @@ public:
|
||||
ErrorCode fromSshProcessExitStatus(int exitStatus);
|
||||
|
||||
QSsh::SshConnectionParameters sshParams(const ServerCredentials &credentials);
|
||||
void disconnectFromHost(const ServerCredentials &credentials);
|
||||
|
||||
ErrorCode removeAllContainers(const ServerCredentials &credentials);
|
||||
ErrorCode removeContainer(const ServerCredentials &credentials, DockerContainer container);
|
||||
|
||||
@@ -45,7 +45,6 @@ void AdvancedServerSettingsLogic::onPushButtonClearServerClicked()
|
||||
}
|
||||
|
||||
ErrorCode e = m_serverController->removeAllContainers(m_settings->serverCredentials(uiLogic()->m_selectedServerIndex));
|
||||
m_serverController->disconnectFromHost(m_settings->serverCredentials(uiLogic()->m_selectedServerIndex));
|
||||
if (e) {
|
||||
emit uiLogic()->showWarningMessage(tr("Error occurred while cleaning the server.") + "\n" +
|
||||
tr("Error message: ") + errorString(e) + "\n" +
|
||||
|
||||
@@ -342,8 +342,6 @@ void UiLogic::installServer(QPair<DockerContainer, QJsonObject> &container)
|
||||
errorCode = pageLogic<ServerConfiguringProgressLogic>()->doInstallAction(installAction, pageFunc, progressBarFunc,
|
||||
noButton, waitInfoFunc,
|
||||
busyInfoFunc, cancelButtonFunc);
|
||||
m_serverController->disconnectFromHost(m_installCredentials);
|
||||
|
||||
if (errorCode == ErrorCode::NoError) {
|
||||
if (!isServerCreated) {
|
||||
QJsonObject server;
|
||||
@@ -534,7 +532,6 @@ ErrorCode UiLogic::addAlreadyInstalledContainersGui(bool createNewServer, bool &
|
||||
|
||||
QMap<DockerContainer, QJsonObject> installedContainers;
|
||||
ErrorCode errorCode = m_serverController->getAlreadyInstalledContainers(credentials, installedContainers);
|
||||
m_serverController->disconnectFromHost(credentials);
|
||||
if (errorCode != ErrorCode::NoError) {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
@@ -372,8 +372,6 @@ void VpnConnection::connectToVpn(int serverIndex,
|
||||
|
||||
createProtocolConnections();
|
||||
|
||||
m_serverController->disconnectFromHost(credentials);
|
||||
|
||||
e = m_vpnProtocol.data()->start();
|
||||
if (e) emit VpnProtocol::Error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user