hazelcast-fix #515
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
java
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
agony-forge/agonyforge!515
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hazelcast-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I discovered a bug in Spring that prevents me from testing whether clustering works. If you log in two characters on the same account on different servers, they can't talk to one another because Spring won't broadcast a message when the user exists locally, even if the destination session isn't local. See #511 for more info.
Previously SessionAttributeService stored session attributes in a local HashMap, meaning each server node only saw attributes for WebSocket sessions connected to it. This caused broken behavior in multi-server deployments: - EchoService.echoToAll() sent messages with missing session attributes to players on other servers - CharacterJanitor incorrectly kicked connected players (their attributes appeared empty on the wrong server) or missed actually-disconnected ones - CommService.sendTo() and executeCommandAs() silently failed when the target character was connected to a different server The fix injects the existing HazelcastInstance bean and stores session attributes in a distributed IMap ("mud-session-attributes") so all cluster nodes share the same session attribute store. SessionAttributeServiceTest was also updated to use a real embedded Hazelcast instance instead of mocking the IMap, ensuring the actual distributed map behavior is exercised.