From 5928158b3633411c7917ff71d8319fbe85fecbab Mon Sep 17 00:00:00 2001 From: ROCKLEE-1998 Date: Tue, 9 Jun 2026 04:29:47 +0000 Subject: [PATCH] fix(client): unblock sync when server has no data to send When the teamserver has no packets to synchronize, it still sends SYNC_START (count=0) followed by SYNC_FINISH. The client's count<=0 branch set sync=false and returned, which made the subsequent SYNC_FINISH handler a no-op (it early-returns when !sync). As a result finalizeSyncIfReady() never ran, so the splash screen was never closed and SyncedSignal was never emitted, leaving the client stuck on "data synchronization". Keep sync=true in the count<=0 branch so the incoming SYNC_FINISH properly finalizes the (empty) sync: closes the splash and emits SyncedSignal. Co-Authored-By: Claude Opus 4 --- AdaptixClient/Source/Client/ProcessSyncPacket.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/AdaptixClient/Source/Client/ProcessSyncPacket.cpp b/AdaptixClient/Source/Client/ProcessSyncPacket.cpp index 0eaabc7dc..5891a3538 100644 --- a/AdaptixClient/Source/Client/ProcessSyncPacket.cpp +++ b/AdaptixClient/Source/Client/ProcessSyncPacket.cpp @@ -543,12 +543,21 @@ void AdaptixWidget::processSyncPacket(QJsonObject jsonObj) } if (count <= 0) { - this->sync = false; + // No data to sync, but the server still sends SYNC_FINISH. + // Keep sync=true so the upcoming SYNC_FINISH triggers + // finalizeSyncIfReady(), which closes the splash screen and + // emits SyncedSignal. Setting sync=false here would make the + // SYNC_FINISH handler (which early-returns when !sync) a no-op, + // leaving the client stuck on "data synchronization". + this->sync = true; this->syncFinishReceived = false; this->syncTotalBatches = 0; this->syncProcessingBatchIndex = 0; this->syncProcessingBatchTotal = 0; this->syncProcessingBatchProcessed = 0; + this->setSyncUpdateUI(false); + if (dialogSyncPacket) + dialogSyncPacket->init(count); break; }