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

Do not timeout when WriteControl deadline is zero #898

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

ghost
Copy link

@ghost ghost commented Feb 15, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Go Version Update
  • Dependency Update

Description

A zero value for the Conn.WriteControl deadline specifies no timeout, but the feature was implemented as a very long timeout (1000 hours). This PR updates the code to use no timeout when the deadline is zero.

See the discussion in #895 for more details.

Related Tickets & Documents

Added/updated tests?

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

Run verifications and test

  • make verify is passing (error unrelated to this pr)
  • make test is passing

A zero value for the Conn.WriteControl deadline specifies no timeout,
but the feature was implemented as a very long timeout (1000 hours).
This PR updates the code to use no timeout when the deadline is zero.

See the discussion in #895 for more details.
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d293aa5) 71.30% compared to head (bba80f7) 71.60%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #898      +/-   ##
==========================================
+ Coverage   71.30%   71.60%   +0.30%     
==========================================
  Files          11       11              
  Lines        1589     1585       -4     
==========================================
+ Hits         1133     1135       +2     
+ Misses        349      345       -4     
+ Partials      107      105       -2     

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

@jaitaiwan
Copy link

A couple linting errors for 1.21. Not sure if they're relevant - haven't investigated deeply

@AlexVulaj
Copy link
Member

The linter errors seem to be unrelated to me. Thanks for the contribution @GreenMarmot

@AlexVulaj AlexVulaj merged commit b2a86a1 into gorilla:main Mar 6, 2024
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants