Skip to content
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

fix: panic when the ctx is nil #1290

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

acehinnnqru
Copy link

@acehinnnqru acehinnnqru commented Mar 5, 2025

What type of PR is this?

fix: set ctx as context.Background when it is nil

When the ctx is nil, the method Do will panic when it trying to call the ctx.Done().

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

@acehinnnqru acehinnnqru requested review from a team as code owners March 5, 2025 16:02
@CLAassistant
Copy link

CLAassistant commented Mar 5, 2025

CLA assistant check
All committers have signed the CLA.

@xiaost xiaost self-assigned this Mar 12, 2025
@acehinnnqru acehinnnqru changed the title fix: set ctx as context.Background when it is nil fix: panic when the ctx is nil Mar 12, 2025
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.19%. Comparing base (d0d9e25) to head (c4d8de3).

Files with missing lines Patch % Lines
pkg/protocol/http1/client.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1290      +/-   ##
===========================================
- Coverage    72.22%   72.19%   -0.03%     
===========================================
  Files          138      138              
  Lines        16137    16139       +2     
===========================================
- Hits         11655    11652       -3     
- Misses        3887     3891       +4     
- Partials       595      596       +1     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants