Skip to content

Commit

Permalink
Replace NPE by warn log.
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenalpha committed May 24, 2024
1 parent e966949 commit 02a059a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,14 @@ private Handler<AsyncResult<HttpClientResponse>> getAsyncHttpClientResponseHandl
respondError(req, StatusCode.INTERNAL_SERVER_ERROR);
});

req.connection().closeHandler((aVoid) -> unpump.run());
HttpConnection connection = req.connection();
if (connection != null) {
connection.closeHandler((Void v) -> unpump.run());
} else {
log.warn("TODO No way to call 'unpump.run()' in the right moment. As there seems"
+ " to be no event we could register a handler for. Gateleen wishes you"
+ " some happy timeouts ({})", req.uri());
}
};
}

Expand Down

0 comments on commit 02a059a

Please sign in to comment.