mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-24 02:00:24 +07:00
fix: prevent stopping Xray due to changing local proxy port
- Added a check in XrayController::stop() to skip the stop operation if Xray is not currently running, with a debug log for clarity.
This commit is contained in:
@@ -55,6 +55,11 @@ bool XrayController::start(const QString &configJson)
|
|||||||
|
|
||||||
bool XrayController::stop()
|
bool XrayController::stop()
|
||||||
{
|
{
|
||||||
|
if (!m_isRunning) {
|
||||||
|
ProxyLogger::getInstance().debug("Skipping Xray stop via IPC: local proxy Xray is not running");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
ProxyLogger::getInstance().info("Stopping Xray via IPC");
|
ProxyLogger::getInstance().info("Stopping Xray via IPC");
|
||||||
|
|
||||||
const bool ipcResult = IpcClient::withInterface([](QSharedPointer<IpcInterfaceReplica> iface) {
|
const bool ipcResult = IpcClient::withInterface([](QSharedPointer<IpcInterfaceReplica> iface) {
|
||||||
|
|||||||
Reference in New Issue
Block a user