Commit d280ce9d authored by Ricki Hirner's avatar Ricki Hirner 🐑

Treat InterruptedIOException like IOException

parent 67c7be90
Pipeline #35856164 passed with stage
in 5 minutes and 41 seconds
......@@ -18,7 +18,7 @@ android {
defaultConfig {
applicationId "at.bitfire.davdroid"
versionCode 212
versionCode 213
buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"
buildConfigField "boolean", "customCerts", "true"
......
......@@ -162,10 +162,9 @@ abstract class SyncManager<out ResourceType: LocalResource<*>, out CollectionTyp
}
// sync was cancelled: re-throw to SyncAdapterService
catch(e: InterruptedException) { throw e }
catch (e: InterruptedIOException) { throw e }
catch (e: InterruptedException) { throw e }
// I/O errors
// specific I/O errors
catch (e: SSLHandshakeException) {
Logger.log.log(Level.WARNING, "SSL handshake failed", e)
......@@ -313,7 +312,8 @@ abstract class SyncManager<out ResourceType: LocalResource<*>, out CollectionTyp
val message: String
when (e) {
is IOException -> {
is IOException,
is InterruptedIOException -> {
Logger.log.log(Level.WARNING, "I/O error", e)
message = context.getString(R.string.sync_error_io, e.localizedMessage)
syncResult.stats.numIoExceptions++
......@@ -369,7 +369,7 @@ abstract class SyncManager<out ResourceType: LocalResource<*>, out CollectionTyp
val channel: String
val priority: Int
if (e is IOException) {
if (e is IOException || e is InterruptedIOException) {
channel = NotificationUtils.CHANNEL_SYNC_IO_ERRORS
priority = NotificationCompat.PRIORITY_MIN
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment