Skip to content

Commit 89b3874

Browse files
fix(conversations): stop a cancelled catch-up from running on
The per-room message catch-up wraps each room in runCatching, which also catches the CancellationException raised when the sync is stopped. The failure was logged and the loop moved on to the next room, so a sync that had been cancelled kept issuing requests for every remaining room. Rethrow the cancellation so the loop ends with the scope that owns it. Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent 90dc05e commit 89b3874

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎app/src/main/java/com/nextcloud/talk/conversationlist/data/network/OfflineFirstConversationsRepository.kt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,10 @@ class OfflineFirstConversationsRepository @Inject constructor(
336336
unreadMessages = room.unreadMessages
337337
)
338338
}
339-
.onFailure { Log.e(TAG, "Message catch-up failed for room ${room.token}", it) }
339+
.onFailure {
340+
if (it is CancellationException) throw it
341+
Log.e(TAG, "Message catch-up failed for room ${room.token}", it)
342+
}
340343
}
341344
}
342345
}

0 commit comments

Comments
 (0)