Skip to content

Commit

Permalink
Fix Reactive...Context NPE
Browse files Browse the repository at this point in the history
Fix possible NPE in `ReactiveWebServerApplicationContext`.

See spring-projectsgh-14666
  • Loading branch information
philwebb committed Oct 4, 2018
1 parent 1774a28 commit 2b6bdfe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,14 @@ public static WebServer getWebServer(ServerManager manager) {

public static void start(ServerManager manager,
Supplier<HttpHandler> handlerSupplier) {
if (manager != null) {
if (manager != null && manager.server != null) {
manager.handler = handlerSupplier.get();
manager.server.start();
}
}

public static void stop(ServerManager manager) {
if (manager != null) {
if (manager != null && manager.server != null) {
try {
manager.server.stop();
}
Expand Down

0 comments on commit 2b6bdfe

Please sign in to comment.