getPlayer does a bare session.request(...).join() on the SaturnPlayer-Worker thread
authenticate does session.request(ServiceMethods.Authenticate, ...).get()
If a response never arrives (the session-java send-then-register race, or a server that stopped answering), these block forever:
a stuck getPlayer freezes the player-fetch worker for the rest of the game, so no other player's cosmetics ever load
a stuck authenticate leaves the client unauthenticated without ever logging a failure
Fix
Add a timeout to every request, e.g. .orTimeout(10, TimeUnit.SECONDS) before join() / get(), and handle TimeoutException. For getPlayer, treat a timeout as "unknown, retry later" rather than "not a Saturn user".
## Problem
None of the `ServiceClient` requests has a timeout:
- `getPlayer` does a bare `session.request(...).join()` on the `SaturnPlayer-Worker` thread
- `authenticate` does `session.request(ServiceMethods.Authenticate, ...).get()`
If a response never arrives (the `session-java` send-then-register race, or a server that stopped answering), these block forever:
- a stuck `getPlayer` freezes the player-fetch worker for the rest of the game, so no other player's cosmetics ever load
- a stuck `authenticate` leaves the client unauthenticated without ever logging a failure
## Fix
- Add a timeout to every request, e.g. `.orTimeout(10, TimeUnit.SECONDS)` before `join()` / `get()`, and handle `TimeoutException`. For `getPlayer`, treat a timeout as "unknown, retry later" rather than "not a Saturn user".
- Pick up the fixed `session-java` release once selimaj-dev/session-java#1 lands.
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
None of the
ServiceClientrequests has a timeout:getPlayerdoes a baresession.request(...).join()on theSaturnPlayer-Workerthreadauthenticatedoessession.request(ServiceMethods.Authenticate, ...).get()If a response never arrives (the
session-javasend-then-register race, or a server that stopped answering), these block forever:getPlayerfreezes the player-fetch worker for the rest of the game, so no other player's cosmetics ever loadauthenticateleaves the client unauthenticated without ever logging a failureFix
.orTimeout(10, TimeUnit.SECONDS)beforejoin()/get(), and handleTimeoutException. ForgetPlayer, treat a timeout as "unknown, retry later" rather than "not a Saturn user".session-javarelease once selimaj-dev/session-java#1 lands.