Skip to content

joladev/latch

Back Wrap refresh in Task

Commit details

Wrap refresh in Task

Description

Because the caller can exit while executing `Latch.query` etc, we risk interrupting the refresh itself. Interrupting a refresh means losing the session since a refresh token can never be re-used. This wraps refresh in an unlinked Task, under a managed Task supervisor. This means refresh can now finish even if the caller exits.

Metadata

Author
Johanna Larsson johanna.a.m.larsson@gmail.com
Committed
Commit

Contributors