lestrrat-go / httprc

Quasi Up-to-date HTTP In-memory Cache
MIT License
17 stars 5 forks source link

Revert "Aquire semaphore when network will be accessed (#25)" #31

Closed natenjoy closed 4 months ago

natenjoy commented 4 months ago

This reverts commit e73952d36956bff91fafef33e771a66d9360e81a. Looks like this optimization wasn't safe and caused issues with the reused request pointer being shared, which ended up in a scenario where the channel could be closed and then sent on. Thanks for pointing this out, @TheJokr .

Likely to fix https://github.com/lestrrat-go/httprc/issues/30

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 63.25%. Comparing base (8a18d6d) to head (09149a0). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #31 +/- ## ========================================== - Coverage 64.01% 63.25% -0.77% ========================================== Files 6 6 Lines 503 430 -73 ========================================== - Hits 322 272 -50 + Misses 168 145 -23 Partials 13 13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lestrrat commented 4 months ago

thanks!