Changed port value in UDPServer to be more accurate

This commit is contained in:
Obique PSWG
2015-05-27 08:28:42 -05:00
parent 786eb4d685
commit 7eb7d09b5b
+1 -1
View File
@@ -63,12 +63,12 @@ public class UDPServer {
public UDPServer(InetAddress bindAddr, int port, int packetSize) throws SocketException {
this.callback = null;
this.packetSize = packetSize;
this.port = port;
inbound = new LinkedBlockingQueue<UDPPacket>();
if (port > 0)
socket = new DatagramSocket(port, bindAddr);
else
socket = new DatagramSocket();
this.port = socket.getLocalPort();
updater = new UDPUpdater();
updater.start();
}