Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynmap sometimes "forgets" to update region markers #4092

Open
Brokkonaut opened this issue Mar 13, 2024 · 0 comments
Open

Dynmap sometimes "forgets" to update region markers #4092

Brokkonaut opened this issue Mar 13, 2024 · 0 comments

Comments

@Brokkonaut
Copy link

Brokkonaut commented Mar 13, 2024

Issue Description: When the dynmap browser tab is in the background for some time and the server updates region markers they are never sent to the client and so they are not updated.

  • Dynmap Version: 3.7-SNAPSHOT-936
  • Server Version: Paper 1.20.4 build 950b736
  • Steps to Replicate:
    • Open the Dynmap in the browser, send the tab to the background
    • Modify a marker on the server
    • Wait more than 2 minutes (this is important)
    • Now look at the dynmap in the browser, the marker will not update
  • Cause and possible solutions:
    • In UpdateQueue.java there is a timeout maxUpdateAge = 120000 that causes updates to be discarded on the server side after 2 minutes, but the client does not request updates when the tab is in the background (map.js, line 614 if (document.visibilityState === "hidden") { ...) - So when it tries to update after more than 2 minutes the updates are lost and the client does not update.
    • I thought about solutions and found 3 options:
      • Increase the discard timeout on the server to a much larger value (like 24 hours or configurable), so updates will only be lost if a tab is inactive for a very long time
      • Do not skip the updates in map.js or
      • Increase the timeout on the server to some medium high value (maybe 35 minutes?) and to not skip the update on the client side all 30 minutes even if the tab is in background

[x] I have looked at all other issues and this is not a duplicate
[x] I have been able to replicate this

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

No branches or pull requests

1 participant