some fixes for picloud, but still not working correctly
This commit is contained in:
@@ -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();
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user