Skip to content

BleWorker: no backoff on repeated reconnect/handshake failure #2

Description

@hurui200320

Found in whole-codebase review.

In esp32/src/normal/BleWorker.cpp (~lines 159-179), when a paired camera advertises, the worker immediately attempts a handshake. If the handshake repeatedly fails (e.g. the classic bond was deleted on the camera side, or the camera is busy), this becomes a tight connect → fail → retry loop:

  • Each attempt blocks the single BLE worker task for up to 45 s (NikonBLEClient::doHandshake connect timeout).
  • During that time, TIME/GEO broadcasts to other already-connected cameras are starved, and other scan results are not processed.

Proposal: add a per-camera retry cooldown (e.g. record the last failed-attempt timestamp in ConnectedCamera and skip retrying for N seconds, possibly with exponential backoff).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ESP32Issues related to ESP32 project

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions