summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md6
-rw-r--r--app/javascript/controllers/timer_controller.js7
2 files changed, 10 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7bf1ce7..82b7a06 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -47,6 +47,12 @@ All notable changes to this project will be documented in this file.
of the UI boxes has been shuffled and tweaked.
- These changes may have introduced undesirable consequences, especially on mobile. Please report these
consequences with screenshots, and let's work together to get the game looking decent everywhere. 👍
+
+### Networking
+- If a "finish activity" request from the client to the server fails 5 or more times, the client will switch from
+ trying every second to trying every minute. This behavior replaces the error alert (popup) that used to occur. This
+ means that the client will continue trying to get rolling again every minute, indefinitely. So hopefully this resolves
+ frustrating issues with leaving the game to find that your activity was halted due to internet issues.
### Engine
- Refactored some activity and combat code.
diff --git a/app/javascript/controllers/timer_controller.js b/app/javascript/controllers/timer_controller.js
index 30e64cc..dcf046a 100644
--- a/app/javascript/controllers/timer_controller.js
+++ b/app/javascript/controllers/timer_controller.js
@@ -40,14 +40,15 @@ export default class extends Controller {
Rails.ajax({
type: "POST",
url: controller.postUrlValue,
+ success: () => {
+ this.postFailures = 0;
+ },
error: () => {
this.postFailures++;
if (this.postFailures < 5) {
setTimeout(controller.finishActivity, 1000);
} else {
- alert("There was an error completing your activity. If your internet connection is otherwise working," +
- " please report this issue, mentioning what you were" +
- " doing at the time. Check if refreshing the page resolves this issue, and mention that as well.");
+ setTimeout(controller.finishActivity, 60000);
}
},
});