Skip to content

Commit

Permalink
Merge pull request #5797 from joewitt/jetty-9.4.x
Browse files Browse the repository at this point in the history
Issue #5794 ensuring serverChannel is closed in the event of a failed bind to ensure proper resources are cleaned
  • Loading branch information
sbordet committed Dec 14, 2020
2 parents 9343844 + f7d4b94 commit db68a31
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -346,6 +346,14 @@ protected ServerSocketChannel openAcceptChannel() throws IOException
}
catch (BindException e)
{
try
{
serverChannel.close();
}
catch (IOException ioe)
{
LOG.warn(ioe);
}
throw new IOException("Failed to bind to " + bindAddress, e);
}
}
Expand Down

0 comments on commit db68a31

Please sign in to comment.