Skip to content

Commit

Permalink
updating ShutdownManager calls after bootique/bootique#346
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed Dec 6, 2023
1 parent 9146659 commit 636e637
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ public Mailer createMailer(CustomMailer customMailer, boolean disabled, Shutdown
}

Mailer mailer = builder.buildMailer();
shutdownManager.addShutdownHook(() -> mailer.shutdownConnectionPool());
return mailer;
return shutdownManager.onShutdown(mailer, Mailer::shutdownConnectionPool);
}

@BQConfigProperty("SMTP server used for mail delivery. '127.0.0.1' by default")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ public Mailer createMailer(CustomMailer customMailer, boolean disabled, Shutdown
}

Mailer mailer = builder.buildMailer();
shutdownManager.addShutdownHook(() -> mailer.shutdownConnectionPool());
return mailer;
return shutdownManager.onShutdown(mailer, Mailer::shutdownConnectionPool);
}

@BQConfigProperty("SMTP server used for mail delivery. '127.0.0.1' by default")
Expand Down

0 comments on commit 636e637

Please sign in to comment.