diff --git a/apps/browser/PingHelper.cpp b/apps/browser/PingHelper.cpp index 030f71610..b5f946b8a 100644 --- a/apps/browser/PingHelper.cpp +++ b/apps/browser/PingHelper.cpp @@ -14,6 +14,12 @@ void PingHelper::Add(int row, const AddrPair &addrPair) pingThread->start(); } +void PingHelper::Reset() +{ + //if (pingThread->isRunning()) + Stop(); +} + void PingHelper::Stop() { emit pingUpdater->stop(); diff --git a/apps/browser/PingHelper.hpp b/apps/browser/PingHelper.hpp index 7866d7bfc..808757482 100644 --- a/apps/browser/PingHelper.hpp +++ b/apps/browser/PingHelper.hpp @@ -17,6 +17,7 @@ class PingHelper : public QObject Q_OBJECT public: + void Reset(); void Add(int row, const AddrPair &addrPair); void Stop(); void SetModel(QAbstractTableModel *model); diff --git a/apps/browser/PingUpdater.cpp b/apps/browser/PingUpdater.cpp index 54122ffd8..befea9c3c 100644 --- a/apps/browser/PingUpdater.cpp +++ b/apps/browser/PingUpdater.cpp @@ -42,7 +42,7 @@ void PingUpdater::process() unsigned ping = PingRakNetServer(server.second.first.toLatin1(), server.second.second); qDebug() << "Pong from" << server.second.first + "|" + QString::number(server.second.second) - << ":" << ping << "ms"; + << ":" << ping << "ms" << "Sizeof servers: " << servers.size(); emit updateModel(server.first, ping); } diff --git a/apps/browser/QueryHelper.cpp b/apps/browser/QueryHelper.cpp index 2e1be8df2..8fee88db8 100644 --- a/apps/browser/QueryHelper.cpp +++ b/apps/browser/QueryHelper.cpp @@ -29,6 +29,7 @@ void QueryHelper::refresh() if (!queryThread->isRunning()) { _model->removeRows(0, _model->rowCount()); + PingHelper::Get().Stop(); queryThread->start(); emit started(); }