bugfix: loading process disable

This commit is contained in:
semenov
2025-01-16 11:12:46 +03:00
parent adbd8395ca
commit e7b13f4ec4
10 changed files with 54 additions and 84 deletions

View File

@@ -54,6 +54,7 @@ void ClientHandler::initialize(int descriptor,ServerLMSWidget *serverWidget,
connect(this,&ClientHandler::sigSocketClose,sendSystem,&SendSystem::socketClose,Qt::AutoConnection);
connect(this,&ClientHandler::sigSocketFlush,sendSystem,&SendSystem::socketFlush,Qt::AutoConnection);
connect(this,&ClientHandler::sigSendPacketType,sendSystem,&SendSystem::sendPacketType,Qt::AutoConnection);
connect(this,&ClientHandler::sigSendStop,sendSystem,&SendSystem::sendStop,Qt::DirectConnection);
connect(socket,&QTcpSocket::readyRead,recognizeSystem,&RecognizeSystem::recognize,Qt::AutoConnection);
connect(socket, &QTcpSocket::disconnected, this, &ClientHandler::sendDisable,Qt::AutoConnection);
@@ -129,8 +130,10 @@ void ClientHandler::sendNeedUpdate(bool flag, quint64 size, quint64 fileCount,qu
void ClientHandler::sendDisable()
{
thread->exit();
thread->wait();
// thread->exit();
// thread->wait();
thread->quit();
emit sigSendStop();
emit sigClientDisconnected(client->getAddress(),client->getPort());
}