Fix auto-retry cap never being reached in KretenLoginWidget
_autoRetryCount was reset to 0 in onPageStarted, which fires after every loadRequest call including the one inside _retryLoad. This meant the retry cap (_maxAutoRetries = 1) was never reached, causing an infinite retry loop on persistent errors. Move the _autoRetryCount reset to onPageFinished so it only clears when the page actually loads successfully (or via the user-initiated _retry which already resets it explicitly). https://claude.ai/code/session_016dhktF2DaoTQeifUaZrxbP
This commit is contained in:
@@ -112,7 +112,6 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
||||
}
|
||||
});
|
||||
|
||||
_autoRetryCount = 0;
|
||||
_startTimeoutTimer();
|
||||
},
|
||||
onProgress: (progress) {
|
||||
@@ -127,6 +126,7 @@ class _KretenLoginWidgetState extends State<KretenLoginWidget>
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
_autoRetryCount = 0;
|
||||
setState(() {
|
||||
currentUrl = url;
|
||||
_initialPageLoaded = true;
|
||||
|
||||
Reference in New Issue
Block a user