Merge pull request #5797 from joewitt/jetty-9.4.x

Issue #5794 ensuring serverChannel is closed in the event of a failed bind to ensure proper resources are cleaned
This commit is contained in:
Simone Bordet 2020-12-14 10:13:37 +01:00 committed by GitHub
commit db68a313cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -346,6 +346,14 @@ public class ServerConnector extends AbstractNetworkConnector
}
catch (BindException e)
{
try
{
serverChannel.close();
}
catch (IOException ioe)
{
LOG.warn(ioe);
}
throw new IOException("Failed to bind to " + bindAddress, e);
}
}