mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T301, core ping fix https://swift-project.slack.com/archives/G7GD2UP9C/p1534677752000100
Identifier list was filled and more and more identifiers got checked via DBus - identifier set if only one unique identifer is needed - using set avoids duplicates and fixes the bug - restart time if registered, no need to check again
This commit is contained in:
@@ -163,6 +163,7 @@ namespace BlackCore
|
||||
CIdentifier CContextApplicationProxy::registerApplication(const CIdentifier &application)
|
||||
{
|
||||
m_proxyPingIdentifiers.insert(application);
|
||||
if (m_pingTimer.isActive()) { m_pingTimer.start(); } // restart, no need to ping again
|
||||
return m_dBusInterface->callDBusRet<BlackMisc::CIdentifier>(QLatin1String("registerApplication"), application);
|
||||
}
|
||||
|
||||
@@ -210,7 +211,7 @@ namespace BlackCore
|
||||
{
|
||||
if (!m_dBusInterface) { return; }
|
||||
if (m_proxyPingIdentifiers.isEmpty()) { return; }
|
||||
const CIdentifierList identifiers = m_proxyPingIdentifiers; // copy so member can be modified
|
||||
const CIdentifierSet identifiers = m_proxyPingIdentifiers; // copy so member can be modified
|
||||
for (const CIdentifier &identifier : identifiers)
|
||||
{
|
||||
this->registerApplication(identifier);
|
||||
|
||||
Reference in New Issue
Block a user