From dfbd57f26b3cf4c7c60dfaf6c16da4d24278d068 Mon Sep 17 00:00:00 2001 From: CryLegend Date: Tue, 19 Apr 2016 16:42:24 +0200 Subject: [PATCH] No reason to force client port to be server port --- src/arma/ber4j/BattlEyeClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arma/ber4j/BattlEyeClient.java b/src/arma/ber4j/BattlEyeClient.java index aefa1d5..23de795 100644 --- a/src/arma/ber4j/BattlEyeClient.java +++ b/src/arma/ber4j/BattlEyeClient.java @@ -72,7 +72,7 @@ public boolean connect(String password) throws IOException { datagramChannel = DatagramChannel.open(); // datagramChannel.configureBlocking(true); // remove? - datagramChannel.bind(new InetSocketAddress(host.getPort())); + datagramChannel.bind(new InetSocketAddress(0)); sendBuffer = ByteBuffer.allocate(datagramChannel.getOption(StandardSocketOptions.SO_SNDBUF)); sendBuffer.order(ByteOrder.LITTLE_ENDIAN); // ArmA 2 server uses little endian