mirror of
https://gitlab.com/Syping/mayu
synced 2024-11-22 03:50:22 +01:00
abort work when parse_hosts fail
This commit is contained in:
parent
2f6507f7c5
commit
e06f1288da
1 changed files with 8 additions and 2 deletions
10
mayu.cpp
10
mayu.cpp
|
@ -360,8 +360,11 @@ void mayu::p_workHosts(const QList<QByteArray> &hostsArray)
|
|||
#ifdef MAYU_UNIX
|
||||
void mayu::p_workPing()
|
||||
{
|
||||
if (!p_hostsParsed)
|
||||
if (!p_hostsParsed) {
|
||||
parse_hosts();
|
||||
if (!p_hostsParsed)
|
||||
return;
|
||||
}
|
||||
QJsonObject jsonObject;
|
||||
const QStringList hostsList = getHosts();
|
||||
for (const QString &host : hostsList) {
|
||||
|
@ -376,8 +379,11 @@ void mayu::p_workPing()
|
|||
|
||||
void mayu::p_workResolve()
|
||||
{
|
||||
if (!p_hostsParsed)
|
||||
if (!p_hostsParsed) {
|
||||
parse_hosts();
|
||||
if (!p_hostsParsed)
|
||||
return;
|
||||
}
|
||||
QJsonObject jsonObject;
|
||||
const QStringList hostsList = getHosts();
|
||||
for (const QString &host : hostsList) {
|
||||
|
|
Loading…
Reference in a new issue