mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
fix: prevent wait for V2ray core, fixed #265
This commit is contained in:
parent
9f251374ff
commit
a01c30623d
@ -98,12 +98,9 @@ namespace Qv2ray
|
||||
process.setProcessEnvironment(env);
|
||||
DEBUG(MODULE_VCORE, "Starting V2ray core with test options")
|
||||
process.start(conf.v2CorePath, QStringList() << "-test" << "-config" << path, QIODevice::ReadWrite | QIODevice::Text);
|
||||
process.waitForFinished();
|
||||
|
||||
if (!process.waitForFinished(1000) && process.exitCode() != 0) {
|
||||
LOG(MODULE_VCORE, "V2ray core failed with an exit code: " + QSTRN(process.exitCode()))
|
||||
QvMessageBoxWarn(nullptr, tr("Cannot start V2ray"), tr("V2ray core failed with an exit code: ") + QSTRN(process.exitCode()));
|
||||
return false;
|
||||
} else if (process.exitCode() != 0) {
|
||||
if (process.exitCode() != 0) {
|
||||
QString output = QString(process.readAllStandardOutput());
|
||||
QvMessageBoxWarn(nullptr, tr("Configuration Error"), output.mid(output.indexOf("anti-censorship.") + 17));
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user