Removal of the separate coroutine launch for synchronization, leveraging the finite emit cold flow from synchronize().
Introducing a try-catch-finally block around synchronize() to handle exceptions.
Increasing the connection timeout to 30 seconds to address ConnectTimeoutException occurrences.
Positive side effect: elimination of the need for an additional coroutine for collecting SyncUploadStates.
Testing:
Network connection was deliberately shut off to observe the behavior during ConnectTimeoutException.
The lock is successfully released, and the worker returns Result.retry.
Successfully observe last set progress from both periodic and one time sync workers.
Fixes #58 and #55
Changes Made:
Positive side effect: elimination of the need for an additional coroutine for collecting SyncUploadStates.
Testing: Network connection was deliberately shut off to observe the behavior during ConnectTimeoutException. The lock is successfully released, and the worker returns Result.retry. Successfully observe last set progress from both periodic and one time sync workers.