Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5232a1a9 authored by cketti's avatar cketti
Browse files

Ignore IOExceptions when sending DONE (Push)

Errors with the connection are dealt with in the receiver thread.
parent 890b1a02
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ package com.fsck.k9.mail.store.imap

import com.fsck.k9.mail.MessagingException
import com.fsck.k9.mail.power.WakeLock
import java.io.IOException
import timber.log.Timber

private const val SOCKET_EXTRA_TIMEOUT_MS = 2 * 60 * 1000L
@@ -59,7 +60,12 @@ internal class RealImapFolderIdler(
    private fun endIdle() {
        if (idleSent && !doneSent) {
            idleRefreshTimer?.cancel()

            try {
                sendDone()
            } catch (e: IOException) {
                Timber.v(e, "%s: IOException while sending DONE", logTag)
            }
        }
    }

@@ -136,7 +142,11 @@ internal class RealImapFolderIdler(
            return
        }

        try {
            sendDone()
        } catch (e: IOException) {
            Timber.v(e, "%s: IOException while sending DONE", logTag)
        }
    }

    @Synchronized