mirror of
https://gitlab.com/Syping/mayu
synced 2024-11-22 12:00:23 +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
|
#ifdef MAYU_UNIX
|
||||||
void mayu::p_workPing()
|
void mayu::p_workPing()
|
||||||
{
|
{
|
||||||
if (!p_hostsParsed)
|
if (!p_hostsParsed) {
|
||||||
parse_hosts();
|
parse_hosts();
|
||||||
|
if (!p_hostsParsed)
|
||||||
|
return;
|
||||||
|
}
|
||||||
QJsonObject jsonObject;
|
QJsonObject jsonObject;
|
||||||
const QStringList hostsList = getHosts();
|
const QStringList hostsList = getHosts();
|
||||||
for (const QString &host : hostsList) {
|
for (const QString &host : hostsList) {
|
||||||
|
@ -376,8 +379,11 @@ void mayu::p_workPing()
|
||||||
|
|
||||||
void mayu::p_workResolve()
|
void mayu::p_workResolve()
|
||||||
{
|
{
|
||||||
if (!p_hostsParsed)
|
if (!p_hostsParsed) {
|
||||||
parse_hosts();
|
parse_hosts();
|
||||||
|
if (!p_hostsParsed)
|
||||||
|
return;
|
||||||
|
}
|
||||||
QJsonObject jsonObject;
|
QJsonObject jsonObject;
|
||||||
const QStringList hostsList = getHosts();
|
const QStringList hostsList = getHosts();
|
||||||
for (const QString &host : hostsList) {
|
for (const QString &host : hostsList) {
|
||||||
|
|
Loading…
Reference in a new issue