ServiceClient connects and authenticates once, in initialize(). Nothing handles the connection dropping afterwards:
a server redeploy (every Coolify deploy disconnects everyone)
a network blip
the server's ping timeout closing the session
When that happens, session still points at the dead connection. Every later setCloak, setHat, buy*, emote and getPlayer call fails or hangs until the player restarts Minecraft. Notifications (other players' emotes and cosmetic changes) stop arriving too.
Fix
Detect the close through a close callback in session-java, or when a send fails.
Reconnect with exponential backoff (for example 1 s → 2 s → … capped at 60 s) and re-run the auth flow.
On success:
re-register the notification handlers (eventHandlers())
refresh the available cloaks and hats
clear or re-fetch the SaturnPlayer cache, since other players may have changed cosmetics meanwhile
Keep the calls that go through session safe while reconnecting: queue them or drop them with a log line, but don't hang.
Depends on session-java exposing close/error events (selimaj-dev/session-java#1 covers failing pending requests on close; close events belong there too).
## Problem
`ServiceClient` connects and authenticates once, in `initialize()`. Nothing handles the connection dropping afterwards:
- a server redeploy (every Coolify deploy disconnects everyone)
- a network blip
- the server's ping timeout closing the session
When that happens, `session` still points at the dead connection. Every later `setCloak`, `setHat`, `buy*`, `emote` and `getPlayer` call fails or hangs until the player restarts Minecraft. Notifications (other players' emotes and cosmetic changes) stop arriving too.
## Fix
- Detect the close through a close callback in `session-java`, or when a send fails.
- Reconnect with exponential backoff (for example 1 s → 2 s → … capped at 60 s) and re-run the auth flow.
- On success:
- re-register the notification handlers (`eventHandlers()`)
- refresh the available cloaks and hats
- clear or re-fetch the `SaturnPlayer` cache, since other players may have changed cosmetics meanwhile
- Keep the calls that go through `session` safe while reconnecting: queue them or drop them with a log line, but don't hang.
Depends on `session-java` exposing close/error events (selimaj-dev/session-java#1 covers failing pending requests on close; close events belong there too).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
ServiceClientconnects and authenticates once, ininitialize(). Nothing handles the connection dropping afterwards:When that happens,
sessionstill points at the dead connection. Every latersetCloak,setHat,buy*,emoteandgetPlayercall fails or hangs until the player restarts Minecraft. Notifications (other players' emotes and cosmetic changes) stop arriving too.Fix
session-java, or when a send fails.eventHandlers())SaturnPlayercache, since other players may have changed cosmetics meanwhilesessionsafe while reconnecting: queue them or drop them with a log line, but don't hang.Depends on
session-javaexposing close/error events (selimaj-dev/session-java#1 covers failing pending requests on close; close events belong there too).