• Andy Wilkinson's avatar
    Don’t use findAvailableTcpPort to allocate Undertow a random port · e927f52f
    Andy Wilkinson authored
    Using findAvailableTcpPort is prone to failure when another process
    starts using the available port before Undertow starts. This commit
    changes UndertowEmbeddedServletContainerFactory to pass the value of
    zero down into Undertow where it will ultimately be passed to a
    ServerSocket which will then use the underlying OS’s support for binding
    to an available port.
    
    Undertow doesn’t provide an API for getting the port(s) on which it’s
    listening. Previously, reflection was being used to access the listener
    configuration but, when a random port is used, this configuration would
    return zero rather than the actual port. The reflective logic has been
    updated to look at Undertow’s channels from which the underlying
    ServerSocket can be accessed and the local port retrieved
    
    Closes gh-2584
    e927f52f
Name
Last commit
Last update
docs Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
spring-boot-versions Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
pom.xml Loading commit data...