fix player address sending#9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdafc3f3a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if(player.getDownstreamConnection() != null && fallbackOnJoin) | ||
| return fallback; |
There was a problem hiding this comment.
Honor fallback_on_join for initial join selection
fetchServer only returns the configured fallback when player.getDownstreamConnection() != null, but the join-handler path (determineServer) runs before a downstream connection exists, so with fallback_on_join=true and no hub available the method returns null instead of the fallback server. This can block first-time joins during hub outages even though fallback is configured.
Useful? React with 👍 / 👎.
| ProxiedPlayer player = ev.getPlayer(); | ||
|
|
||
| if(!ev.isCancelled()) CloudInterface.getInstance().playerLogin(player.getName(), player.getUniqueId().toString(), player.getAddress().getHostName()); | ||
| if(!ev.isCancelled()) CloudInterface.getInstance().playerLogin(player.getName(), player.getUniqueId().toString(), player.getAddress().toString()); |
There was a problem hiding this comment.
Send IP address without ephemeral source port
Switching login reporting to SocketAddress.toString() sends values that include the client source port (and sometimes extra formatting), so the ip field becomes different on every reconnect from the same client. This breaks stable IP-based tracking/lookup semantics for playerLogin and affects all newly changed listeners using this pattern.
Useful? React with 👍 / 👎.
No description provided.