mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
bugfix: streaming assets folder hash
This commit is contained in:
@@ -65,7 +65,7 @@ void SendSystem::sendFileBlock(QString path)
|
||||
|
||||
|
||||
|
||||
socket->waitForBytesWritten(10);
|
||||
//socket->waitForBytesWritten(10);
|
||||
|
||||
if(file.open(QFile::ReadOnly))
|
||||
{
|
||||
@@ -73,7 +73,7 @@ void SendSystem::sendFileBlock(QString path)
|
||||
{
|
||||
QByteArray data = file.read(1025*250);
|
||||
stream << data;
|
||||
socket->waitForBytesWritten(10);
|
||||
//socket->waitForBytesWritten(10);
|
||||
|
||||
if(socket->state() == QAbstractSocket::UnconnectedState) break;
|
||||
countSend++;
|
||||
@@ -84,8 +84,8 @@ void SendSystem::sendFileBlock(QString path)
|
||||
|
||||
file.close();
|
||||
countSend = 0;
|
||||
socket->waitForBytesWritten(10);
|
||||
socket->waitForReadyRead(20);
|
||||
// socket->waitForBytesWritten(10);
|
||||
// socket->waitForReadyRead(20);
|
||||
}
|
||||
|
||||
void SendSystem::sendVersion()
|
||||
@@ -201,6 +201,7 @@ void SendSystem::sendXmlAnswer(QByteArray array, PacketType packetType)
|
||||
socket->waitForBytesWritten();
|
||||
}
|
||||
|
||||
socket->flush();
|
||||
socket->waitForReadyRead(2000);
|
||||
}
|
||||
|
||||
@@ -236,12 +237,12 @@ void SendSystem::updateFiles(QList<FileData> fileSendList, QList<FileData> delet
|
||||
if (data.hash == "FOLDER")
|
||||
{
|
||||
sendFolderBlock(data.path);
|
||||
socket->waitForReadyRead(100);
|
||||
socket->waitForBytesWritten();
|
||||
}
|
||||
else
|
||||
{
|
||||
sendFileBlock(data.path);
|
||||
socket->waitForReadyRead(100);
|
||||
socket->waitForBytesWritten();
|
||||
}
|
||||
|
||||
if(isSendStopped) return;
|
||||
|
||||
Reference in New Issue
Block a user