Skip to content

Commit

Permalink
fix cancellation of workers
Browse files Browse the repository at this point in the history
  • Loading branch information
simonroesch committed Mar 18, 2022
1 parent 1cb9e66 commit d384ac3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void startKeyLoadWorker(Context context) {
}

public static void stop(Context context) {
WorkManager.getInstance(context).cancelAllWorkByTag(WORK_TAG);
WorkManager.getInstance(context).cancelUniqueWork(WORK_TAG);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ConfigWorker(context: Context, workerParams: WorkerParameters) : Coroutine
}

fun stop(context: Context) {
WorkManager.getInstance(context).cancelAllWorkByTag(FakeWorker.WORK_TAG)
WorkManager.getInstance(context).cancelUniqueWork(WORK_NAME);
}

@Throws(IOException::class, ResponseError::class, SignatureException::class)
Expand Down

0 comments on commit d384ac3

Please sign in to comment.