Commit 832931dd authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Calculating the port in the getter is a bad idea because it then shows the wrong port in the UI

parent 2a63fe5f
......@@ -111,7 +111,7 @@ public class DNSServerSetting extends SingletonEntity implements Serializable{
}
public int getPort() {
return localRedirectPort == -1 ? port : localRedirectPort;
return port;
}
public int getServerTimeout() {
......
......@@ -38,7 +38,7 @@ public class UDPServer extends DNSServer{
public void run() {
try {
settings.setServerRunning(true);
serverSocket = new DatagramSocket(settings.getPort());
serverSocket = new DatagramSocket(settings.getLocalRedirectPort() == -1 ? settings.getPort() : settings.getLocalRedirectPort());
//System.out.println("Listening on: " + serverSocket.getLocalSocketAddress());
byte[] data = new byte[32767];
DatagramPacket packet;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment