File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/main/java/org/simplejavamail/mailer/internal/mailsender Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ private static AnonymousSocks5Server configureSessionWithProxy(@Nonnull final Pr
190190 * @see Executors#newFixedThreadPool(int)
191191 */
192192 public final synchronized void send (final Email email , final boolean async ) {
193+ configureSessionWithTimeout (session , operationalConfig .getSessionTimeout ());
194+
193195 /*
194196 we need to track even non-async emails to prevent async emails from shutting down
195197 the proxy bridge server (or connection pool in async mode) while a non-async email is still being processed
@@ -204,7 +206,6 @@ the proxy bridge server (or connection pool in async mode) while a non-async ema
204206 if (executor == null || executor .isShutdown ()) {
205207 executor = Executors .newFixedThreadPool (operationalConfig .getThreadPoolSize ());
206208 }
207- configureSessionWithTimeout (session , operationalConfig .getSessionTimeout ());
208209 executor .execute (new NamedRunnable ("sendMail process" ) {
209210 @ Override
210211 public void run () {
You can’t perform that action at this time.
0 commit comments