Skip to content

fix: small race fixes - #106

Merged
lidel merged 2 commits into
mainfrom
fix-races
Sep 15, 2025
Merged

lidel merged 2 commits into
mainfrom
fix-races

Conversation

@lidel

@lidel lidel commented Sep 13, 2025

Copy link
Copy Markdown
Contributor

small nits:

  • 8183f5b race condition: providersCount was accessed without synchronization, causing potential data races
  • 4c970d5 missing timeout handling: Provider discovery loop didn't respect context timeout, could run indefinitely

prevents concurrent access to shared counter when processing providers from DHT and IPNI
adds context.Done() case to select statement to honor the timeout from URL parameters (5-300 seconds)
@lidel
lidel requested a review from gammazero September 13, 2025 03:41
@lidel
lidel marked this pull request as ready for review September 13, 2025 03:49
@lidel

lidel commented Sep 15, 2025

Copy link
Copy Markdown
Contributor Author

i'm assuming these are harmless, so merging to ship backend asap (turns out this repo was set up in a way that automatically deploys fronted to production 😰 but lucky for us, there were no breaking changes)

@lidel
lidel merged commit 03daa02 into main Sep 15, 2025
@lidel
lidel deleted the fix-races branch September 15, 2025 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址