File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
src/main/java/org/simplejavamail/mailer/internal/mailsender Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 66import org .simplejavamail .email .Recipient ;
77import org .simplejavamail .mailer .MailerGenericBuilder ;
88import org .simplejavamail .mailer .config .TransportStrategy ;
9+ import org .simplejavamail .mailer .internal .mailsender .concurrent .NamedRunnable ;
910import org .simplejavamail .mailer .internal .socks .AuthenticatingSocks5Bridge ;
1011import org .simplejavamail .mailer .internal .socks .SocksProxyConfig ;
1112import org .simplejavamail .mailer .internal .socks .socks5server .AnonymousSocks5Server ;
@@ -196,16 +197,11 @@ the proxy bridge server (or connection pool in async mode) while a non-async ema
196197 executor = Executors .newFixedThreadPool (operationalConfig .getThreadPoolSize ());
197198 }
198199 configureSessionWithTimeout (session , operationalConfig .getSessionTimeout ());
199- executor .execute (new Runnable ( ) {
200+ executor .execute (new NamedRunnable ( "sendMail process" ) {
200201 @ Override
201202 public void run () {
202203 sendMailClosure (session , email );
203204 }
204-
205- @ Override
206- public String toString () {
207- return "sendMail process" ;
208- }
209205 });
210206 } else {
211207 sendMailClosure (session , email );
Original file line number Diff line number Diff line change 1+ package org .simplejavamail .mailer .internal .mailsender .concurrent ;
2+
3+ public abstract class NamedRunnable implements Runnable {
4+
5+ private final String name ;
6+
7+ public NamedRunnable (String name ) {
8+ this .name = name ;
9+ }
10+
11+ @ Override
12+ public String toString () {
13+ return name ;
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments