@ -159,20 +159,36 @@ public class UndertowServletWebServer implements WebServer {
@@ -159,20 +159,36 @@ public class UndertowServletWebServer implements WebServer {
.info("Undertow started on port(s) "+getPortsDescription());
}
catch(Exceptionex){
if(findBindException(ex)!=null){
List<Port>failedPorts=getConfiguredPorts();
List<Port>actualPorts=getActualPorts();
failedPorts.removeAll(actualPorts);
if(failedPorts.size()==1){
thrownewPortInUseException(
failedPorts.iterator().next().getNumber());
try{
if(findBindException(ex)!=null){
List<Port>failedPorts=getConfiguredPorts();
List<Port>actualPorts=getActualPorts();
failedPorts.removeAll(actualPorts);
if(failedPorts.size()==1){
thrownewPortInUseException(
failedPorts.iterator().next().getNumber());
}
}
thrownewWebServerException("Unable to start embedded Undertow",ex);
}
finally{
stopSilently();
}
thrownewWebServerException("Unable to start embedded Undertow",ex);