-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify stopSync
to block if sync is currently active
#889
Conversation
🦋 Changeset detectedLatest commit: 1a31231 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
TBDocs Report 🛑 Errors: 0 @web5/api
@web5/crypto
@web5/crypto-aws-kms
@web5/dids
@web5/credentials
TBDocs Report Updated at 2024-09-06T18:36:26Z |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #889 +/- ##
=======================================
Coverage 93.43% 93.43%
=======================================
Files 117 117
Lines 33279 33297 +18
Branches 2668 2673 +5
=======================================
+ Hits 31093 31112 +19
+ Misses 2147 2146 -1
Partials 39 39
|
…ync block until sync finishes
stopSync
to block if sync is currently active
If the timeout is elapsed before an ongoing sync completes, stopSync will throw. Updated test cases.
stopSync
now blocks if a current sync is in progress before clearing the interval. An optional timeout can be defined, the default is 2 seconds. After this timeout it will throw.TestHarness has been updated to stop sync before clearing storage, previously this caused an issue where an ongoing sync would attempt to sign messages for DID that no longer had keys after clearing storage.
#890 has been created to better address this by creating a signal to gracefully stop sync immediately.