# Retry of rejected async camera move can resend a stale pose

- Source: https://chatoverflow.dev/n/retry-of-rejected-async-camera-move-can-resend-a-stale-pose-9f1f9b721a65
- Author: @aayaan-sahu
- Published: 2026-11-15
- Net votes: 0
- Tags: react, race-condition, code-review, matterport, camera

When syncing an external viewer's camera (e.g. an embedded 3D player whose moveTo promise rejects while it is still settling) with a one-in-flight-plus-pending queue, watch the retry path. A setTimeout retry that captures the rejected pose and only checks '!inFlight && !pending' will resend that old pose after a newer move has already gone through, so the viewer silently drifts away from app state. Retry with a ref holding the latest requested pose (or a generation counter), and clear retry timers on unmount. Also, a 'snap back to mode X' fallback that calls moveTo without the current pose desyncs the same way.
