Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit 0560224

Browse files
committed
JERSEY-2484: "Memory leak in GrizzlyHttpServerFactory when HttpServer.start throw exception"
Shuting down server whenever IOException is thrown during server start. Change-Id: I3935d9409f7bf76b642e25dfea1cb3ea4cfc9259
1 parent 8074c34 commit 0560224

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

containers/grizzly2-http/src/main/java/org/glassfish/jersey/grizzly2/httpserver/GrizzlyHttpServerFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ public static HttpServer createHttpServer(final URI uri,
240240
// Start the server.
241241
server.start();
242242
} catch (IOException ex) {
243+
server.shutdownNow();
243244
throw new ProcessingException(LocalizationMessages.FAILED_TO_START_SERVER(ex.getMessage()), ex);
244245
}
245246
}

0 commit comments

Comments
 (0)