mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
fix: waiting starting xray before setting running flag
This commit is contained in:
@@ -36,7 +36,12 @@ bool XrayController::start(const QString &configJson)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool ipcResult = IpcClient::withInterface([&](QSharedPointer<IpcInterfaceReplica> iface) {
|
const bool ipcResult = IpcClient::withInterface([&](QSharedPointer<IpcInterfaceReplica> iface) {
|
||||||
iface->xrayStart(configJson);
|
auto xrayStart = iface->xrayStart(configJson);
|
||||||
|
if (!xrayStart.waitForFinished() || !xrayStart.returnValue()) {
|
||||||
|
ProxyLogger::getInstance().warning("Failed to start Xray via IPC");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}, []() {
|
}, []() {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user