mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
fix: resolve NostrClient initialization race condition
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
a5c4b97085
commit
e6a73687dd
4 files changed
+158
-33
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# Weekly Agent Task Complete: Race Condition Audit
|
||||
|
||||
- **Agent**: race-condition-agent
|
||||
- **Date**: 2026-02-14
|
||||
- **Cadence**: Weekly
|
||||
|
||||
## Summary
|
||||
Audited `js/nostr/client.js` and identified a critical race condition in the initialization logic where `isInitialized` was set prematurely. Implemented a fix using the `initPromise` pattern and validated it with a new reproduction test.
|
||||
|
||||
## Artifacts
|
||||
- **Report**: [docs/race-condition-reports/weekly-race-condition-report-2026-02-14.md](../../race-condition-reports/weekly-race-condition-report-2026-02-14.md)
|
||||
- **Reproduction Test**: [tests/race/nostr-client-init-race.test.mjs](../../../../tests/race/nostr-client-init-race.test.mjs)
|
||||
|
||||
## Next Steps
|
||||
- Monitor Sentry for `Cannot read properties of null` errors related to pool access.
|
||||
Reference in new issue
Block a user