Commit e85a544a authored by Matt Tucker's avatar Matt Tucker Committed by matt

Fix SSL accept thread (JM-522).

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3330 b35dd754-fafc-0310-a699-88a17e54d16e
parent 936f4683
...@@ -15,6 +15,7 @@ import org.jivesoftware.wildfire.ConnectionManager; ...@@ -15,6 +15,7 @@ import org.jivesoftware.wildfire.ConnectionManager;
import org.jivesoftware.wildfire.ServerPort; import org.jivesoftware.wildfire.ServerPort;
import org.jivesoftware.util.LocaleUtils; import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
import org.jivesoftware.util.JiveGlobals;
import javax.net.ssl.SSLException; import javax.net.ssl.SSLException;
import java.io.IOException; import java.io.IOException;
...@@ -34,11 +35,6 @@ public class SSLSocketAcceptThread extends Thread { ...@@ -34,11 +35,6 @@ public class SSLSocketAcceptThread extends Thread {
*/ */
public static final int DEFAULT_PORT = 5223; public static final int DEFAULT_PORT = 5223;
/**
* Interface to bind to
*/
private InetAddress bindInterface;
/** /**
* Holds information about the port on which the server will listen for connections. * Holds information about the port on which the server will listen for connections.
*/ */
...@@ -78,8 +74,9 @@ public class SSLSocketAcceptThread extends Thread { ...@@ -78,8 +74,9 @@ public class SSLSocketAcceptThread extends Thread {
this.connManager = connManager; this.connManager = connManager;
this.serverPort = serverPort; this.serverPort = serverPort;
int port = serverPort.getPort(); int port = serverPort.getPort();
String interfaceName = serverPort.getInterfaceName(); // Listen on a specific network interface if it has been set.
bindInterface = null; String interfaceName = JiveGlobals.getXMLProperty("network.interface");
InetAddress bindInterface = null;
if (interfaceName != null) { if (interfaceName != null) {
try { try {
if (interfaceName.trim().length() > 0) { if (interfaceName.trim().length() > 0) {
......
...@@ -67,7 +67,7 @@ public class SocketAcceptThread extends Thread { ...@@ -67,7 +67,7 @@ public class SocketAcceptThread extends Thread {
super("Socket Listener at port " + serverPort.getPort()); super("Socket Listener at port " + serverPort.getPort());
this.connManager = connManager; this.connManager = connManager;
this.serverPort = serverPort; this.serverPort = serverPort;
// Listen on a specific network interface if it's been set. // Listen on a specific network interface if it has been set.
String interfaceName = JiveGlobals.getXMLProperty("network.interface"); String interfaceName = JiveGlobals.getXMLProperty("network.interface");
InetAddress bindInterface = null; InetAddress bindInterface = null;
if (interfaceName != null) { if (interfaceName != null) {
......
Markdown is supported
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