Skip to content

Commit ec3fb73

Browse files
mf-litclaude
andcommitted
Schedule retry after connectivity timeout instead of giving up
When WiFi connectivity times out after 30s, the device would show an error and stop — no alarm was scheduled for the next cycle. This meant the device sat idle indefinitely until the user manually tapped "Next". Now calls scheduleNextCycle() after the timeout so the device will wake and retry on its normal refresh interval, matching the behavior of other fetch error paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 321dac3 commit ec3fb73

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/com/bpmct/trmnl_nook_simple_touch/DisplayActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,15 @@ public void run() {
453453
logD("Ensure you are connected to WiFi. Press the home button and go into settings to configure.");
454454
cancelConnectivityWait();
455455
if (showErrorInMenu) {
456-
a.showMenuStatus("Couldn't connect. Tap Next to retry.", true);
456+
a.showMenuStatus("Couldn't connect. Will retry next cycle.", true);
457457
} else {
458-
if (a.contentView != null) a.contentView.setText("Couldn't connect. Tap Next to retry.");
458+
if (a.contentView != null) a.contentView.setText("Couldn't connect. Will retry next cycle.");
459459
if (a.contentScroll != null) a.contentScroll.setVisibility(View.VISIBLE);
460460
if (a.imageView != null) a.imageView.setVisibility(View.GONE);
461461
if (a.logView != null) a.logView.setVisibility(View.VISIBLE);
462462
a.forceFullRefresh();
463463
}
464+
a.scheduleNextCycle();
464465
}
465466
};
466467
refreshHandler.postDelayed(pendingConnectivityTimeoutRunnable, CONNECTIVITY_MAX_WAIT_MS);

0 commit comments

Comments
 (0)