Skip to content

Commit

Permalink
Merge pull request #36571 from cescoffier/fix-multiple-smtp-servers
Browse files Browse the repository at this point in the history
Fix the mailer connection pool when multiple mailers are used
  • Loading branch information
gsmet authored Oct 19, 2023
2 parents cba9cd3 + 24fb1aa commit 8dfbcb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ public void stop() {

private MailClient createMailClient(Vertx vertx, MailerRuntimeConfig config, TlsConfig tlsConfig) {
io.vertx.ext.mail.MailConfig cfg = toVertxMailConfig(config, tlsConfig);
return MailClient.createShared(vertx, cfg);
// Do not create a shared instance, as we want separated connection pool for each SMTP servers.
return MailClient.create(vertx, cfg);
}

private io.vertx.ext.mail.DKIMSignOptions toVertxDkimSignOptions(DkimSignOptionsConfig optionsConfig) {
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/virtual-threads/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<!-- gradle scan capture test logging disabled: System.out in virtual threads cause pinning when enabled. -->
<argLine>-Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false</argLine>
<argLine>--enable-preview -Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false</argLine>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
Expand All @@ -131,6 +131,7 @@
<version>${version.compiler.plugin}</version>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
Expand Down

0 comments on commit 8dfbcb8

Please sign in to comment.