fix: app freezes when revoke awg/wg client during active connection (#2211)

* block configs revoke during connection

* update: check that current config is active

* update: notification text
This commit is contained in:
MrMirDan
2026-05-15 16:01:39 +03:00
committed by GitHub
parent 2a3e3126ac
commit c9ed0baf3b

View File

@@ -835,7 +835,15 @@ PageType {
var noButtonFunction = function() {
}
showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
var isActiveConfigForCurrentClient = ServersModel.isDefaultServerCurrentlyProcessed()
&& ServersModel.getDefaultServerData("defaultContainer") === ContainersModel.getProcessedContainerIndex()
if ((ConnectionController.isConnectionInProgress || ConnectionController.isConnected)
&& isActiveConfigForCurrentClient) {
PageController.showNotificationMessage("Unable to revoke current config during active connection")
} else {
showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
}
}
}
}