try to fix cloud again

This commit is contained in:
2024-06-01 22:27:39 +03:00
parent af4b718053
commit d46b5e008a
8 changed files with 24 additions and 18 deletions

View File

@@ -55,7 +55,7 @@ PICloudServer::PICloudServer(const PIString & path, PIIODevice::DeviceMode mode)
open_mutex.unlock();
ping_timer.stop();
});
CONNECTL(&ping_timer, tickEvent, [this](void *, int) {
ping_timer.setSlot([this]() {
if (eth.isConnected()) tcp.sendPing();
});
}

View File

@@ -89,7 +89,7 @@ private:
PIVector<Client *> clients_;
PIVector<Client *> removed_clients_;
PIMap<uint, Client *> index_clients;
PITimer ping_timer;
PIThread ping_timer;
PIConditionVariable cvar;
PIMutex open_mutex;
mutable PIMutex clients_mutex;