Skip to content

fix(client): unblock sync when teamserver has no data to send#338

Open
ROCKLEE-1998 wants to merge 1 commit into
Adaptix-Framework:mainfrom
ROCKLEE-1998:fix/sync-empty-data
Open

fix(client): unblock sync when teamserver has no data to send#338
ROCKLEE-1998 wants to merge 1 commit into
Adaptix-Framework:mainfrom
ROCKLEE-1998:fix/sync-empty-data

Conversation

@ROCKLEE-1998

Copy link
Copy Markdown

Summary

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 in ProcessSyncPacket.cpp 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".

This change keeps sync = true in the count <= 0 branch so the incoming SYNC_FINISH properly finalizes the (empty) sync: it closes the splash screen and emits SyncedSignal.

Changes

  • AdaptixClient/Source/Client/ProcessSyncPacket.cpp: in the count <= 0 branch, keep sync = true, reset the batch counters, call setSyncUpdateUI(false), and initialize the dialog with count so the upcoming SYNC_FINISH can finalize.

Test plan

  • Client builds cleanly (incremental CMake build, only pre-existing Qt deprecation warnings).
  • Connect a client to a teamserver that has no stored packets and confirm the splash closes and the UI becomes usable (no longer stuck on "data synchronization").
  • Confirm the normal (count > 0) sync path is unaffected.

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 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant