Skip to content

Commit

Permalink
Ensure proxiedAddresses is not null before lookup (#4539)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kas-tle authored Apr 1, 2024
1 parent fa441f1 commit 08aa528
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ public boolean onConnectionRequest(InetSocketAddress inetSocketAddress) {
ip = "<IP address withheld>";
}

ConnectionRequestEvent requestEvent = new ConnectionRequestEvent(inetSocketAddress, this.proxiedAddresses.get(inetSocketAddress));
ConnectionRequestEvent requestEvent = new ConnectionRequestEvent(
inetSocketAddress,
this.proxiedAddresses != null ? this.proxiedAddresses.get(inetSocketAddress) : null
);
geyser.eventBus().fire(requestEvent);
if (requestEvent.isCancelled()) {
geyser.getLogger().debug("Connection request from " + ip + " was cancelled using the API!");
Expand Down

0 comments on commit 08aa528

Please sign in to comment.