Commit f4950d86 authored by Adrien's avatar Adrien

* Some internal tomcat ports are not detected as used if we check with

localhost (8009).

[BST-417](https://bonitasoft.atlassian.net/browse/BST-417)
parent 72ef8812
......@@ -262,7 +262,8 @@ public class UIDesignerServerManager implements IBonitaProjectListener {
private static boolean isPortAvailable(int port) {
try {
return org.eclipse.wst.server.core.util.SocketUtil.isPortInUse(InetAddress.getByName("localhost"), port);
return org.eclipse.wst.server.core.util.SocketUtil.isPortInUse(InetAddress.getByName("localhost"), port)
|| org.eclipse.wst.server.core.util.SocketUtil.isPortInUse(port);
} catch (UnknownHostException e) {
return org.eclipse.wst.server.core.util.SocketUtil.isPortInUse(port);
}
......
......@@ -131,7 +131,7 @@ public class PortConfigurator {
protected boolean isPortInUse(final int port) {
try {
return SocketUtil.isPortInUse(InetAddress.getByName("localhost"), port);
return SocketUtil.isPortInUse(InetAddress.getByName("localhost"), port) || SocketUtil.isPortInUse(port);
} catch (UnknownHostException e) {
return SocketUtil.isPortInUse(port);
}
......
......@@ -87,7 +87,8 @@ public class WatchdogManager {
private boolean portIsUsed() {
try {
return SocketUtil.isPortInUse(InetAddress.getByName("localhost"), WATCHDOG_PORT);
return SocketUtil.isPortInUse(InetAddress.getByName("localhost"), WATCHDOG_PORT)
|| SocketUtil.isPortInUse(WATCHDOG_PORT);
} catch (UnknownHostException e) {
return SocketUtil.isPortInUse(WATCHDOG_PORT);
}
......
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