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

[Bug Report]: mute cache #153

Closed
2 tasks done
MrEDok opened this issue Jun 7, 2022 · 0 comments
Closed
2 tasks done

[Bug Report]: mute cache #153

MrEDok opened this issue Jun 7, 2022 · 0 comments
Labels
bug Interferes with efficient operation
Milestone

Comments

@MrEDok
Copy link

MrEDok commented Jun 7, 2022

LibertyBans Version

LibertyBans 1.0.2-SNAPSHOT (Build54)

I have confirmed that ...

  • LibertyBans is up to date
  • No similar issue has been reported

Platform

Spigot/Paper, Bungeecord

Description

[22:24:04 ERROR]: Could not pass event AsyncPlayerPreLoginEvent to LibertyBans v1.0.2-SNAPSHOT
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Found an existing mute cache entry for player e4329fc4-5dd1-496e-85f1-1c7488589106. Maybe the player is already logged in? Last updated PT1M19.512115449S
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:722) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IllegalStateException: Found an existing mute cache entry for player bc1ace6e-8062-4b8b-a079-ff59adacf8ce. Maybe the player is already logged in? Last updated PT1M19.512115449S
at space.arim.libertybans.core.selector.cache.AlwaysAvailableMuteCache.lambda$cacheOnLogin$4(AlwaysAvailableMuteCache.java:153) ~[LibertyBans-ClassLoader:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
... 5 more

Happen randomly whern player chat or sometime when they join/leave the server.

@MrEDok MrEDok added the bug Interferes with efficient operation label Jun 7, 2022
A248 added a commit that referenced this issue Jun 10, 2022
A248 added a commit that referenced this issue Jun 11, 2022
* Do not rely on PlayerQuitEvent. It is possible for a player to
  abort the login process between AsyncPlayerPreLoginEvent and
  PlayerJoinEvent, in which case the quit event will never fire.
  Also, it may be possible (though I have not bothered to try) that
  another login event may fire before the last quit event if the
  player quits and rejoins very quickly.
* Purge old mutes from the cache periodically. Make sure to retain
  a grace period so that mutes are not purged during the login
  process (during the login process, player name lookups will
  return null)
@A248 A248 added this to the 1.0.2 milestone Jun 11, 2022
A248 added a commit that referenced this issue Jun 11, 2022
* Do not rely on PlayerQuitEvent. It is possible for a player to
  abort the login process between AsyncPlayerPreLoginEvent and
  PlayerJoinEvent, in which case the quit event will never fire.
  Also, it may be possible (though I have not bothered to try) that
  another login event may fire before the last quit event if the
  player quits and rejoins very quickly.
* Purge old mutes from the cache periodically. Make sure to retain
  a grace period so that mutes are not purged during the login
  process (during the login process, player name lookups will
  return null)
@A248 A248 closed this as completed Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Interferes with efficient operation
Projects
None yet
Development

No branches or pull requests

2 participants