Skip to content

Commit d41694b

Browse files
committed
Added handling SocketException as a communication issue.| #328
1 parent 329712d commit d41694b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

FlowCrypt/src/main/java/com/flowcrypt/email/jobscheduler/MessagesSenderJobService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import java.io.InputStream;
5353
import java.io.OutputStream;
5454
import java.lang.ref.WeakReference;
55+
import java.net.SocketException;
5556
import java.nio.charset.StandardCharsets;
5657
import java.util.Iterator;
5758
import java.util.List;
@@ -295,7 +296,8 @@ private void sendQueuedMessages(Context context, AccountDao accountDao, MessageD
295296

296297
if (e instanceof MessagingException) {
297298
if (e.getCause() != null) {
298-
if (e.getCause() instanceof SSLException) {
299+
if (e.getCause() instanceof SSLException
300+
|| e.getCause() instanceof SocketException) {
299301
newMessageState = MessageState.QUEUED;
300302
}
301303
}

0 commit comments

Comments
 (0)