Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
router.route("/api/testRuns*").handler(ctx -> client.getConnection(res -> {
if (res.failed()) {
ctx.fail(res.cause());
} else {
SQLConnection conn = res.result();
ctx.put("conn", conn);
ctx.addHeadersEndHandler(done -> conn.close(close -> {
}));
ctx.next();
}
})).failureHandler(ctx -> {
SQLConnection conn = ctx.get("conn");
if (conn != null) {
conn.close(close -> {
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.