some fixes for picloud, but still not working correctly

This commit is contained in:
Бычков Андрей
2022-11-08 14:43:52 +03:00
parent 36ff427e0d
commit 897f03f3d0
10 changed files with 60 additions and 55 deletions

View File

@@ -18,7 +18,7 @@ int main(int argc, char * argv[]) {
piCout << "[Client] send:" << str;
c.write(str.toByteArray());
}
if (s.isRunning()) {
if (s.isThreadedRead()) {
for (auto cl : clients) {
if (cl->isOpened()) {
PIString str = "ping_S";
@@ -51,9 +51,11 @@ int main(int argc, char * argv[]) {
}
}));
CONNECTL(cl, closed, ([&clients, cl](){
piCout << "[Server] client closed ..." << cl;
cl->stop();
clients.removeAll(cl);
cl->deleteLater();
piCout << "[Server] client closed ok" << cl;
//cl->deleteLater();
}));
cl->startThreadedRead();
}));