这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@danielgtaylor
Copy link
Owner

This attempts to fix a hard-to-repro race condition when returning an error due to marshaling that includes a reference to the body bytes that will get returned to the pool for re-use before the output is done. The fix here is to cast the bytes to a string, which creates a copy that is safe to reference later.

Fixes #685.

Copilot AI review requested due to automatic review settings December 22, 2024 17:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@codecov
Copy link

codecov bot commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.77%. Comparing base (5c03160) to head (1182cc1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #687   +/-   ##
=======================================
  Coverage   92.77%   92.77%           
=======================================
  Files          22       22           
  Lines        4915     4915           
=======================================
  Hits         4560     4560           
  Misses        308      308           
  Partials       47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielgtaylor danielgtaylor merged commit 44aab0b into main Dec 22, 2024
7 checks passed
@danielgtaylor danielgtaylor deleted the fix-body-error-race branch December 22, 2024 18:00
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.

Race condition detected

2 participants