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

Propagate request context behaviour to gin context methods implementing stdlib context.Context interface. #1803

Closed

Conversation

xakep666
Copy link

@xakep666 xakep666 commented Mar 8, 2019

It makes possible to correctly cancel handlers when request cancelled (connection closed, etc.)
Try to extract value from request context when it was not found in gin context

@xakep666 xakep666 force-pushed the propagate-request-context branch 2 times, most recently from 00a2dd4 to 785d344 Compare March 8, 2019 20:31
@codecov
Copy link

codecov bot commented Mar 8, 2019

Codecov Report

Merging #1803 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1803      +/-   ##
==========================================
+ Coverage   98.62%   98.63%   +<.01%     
==========================================
  Files          41       42       +1     
  Lines        2113     2127      +14     
==========================================
+ Hits         2084     2098      +14     
  Misses         18       18              
  Partials       11       11
Impacted Files Coverage Δ
context.go 98.32% <ø> (-0.06%) ⬇️
context_pre17.go 100% <100%> (ø)
context_17.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70a0aba...b7e79c5. Read the comment docs.

@xakep666 xakep666 force-pushed the propagate-request-context branch 2 times, most recently from edc4df5 to 900325b Compare March 8, 2019 20:34
…ng stdlib context.Context interface.

It makes possible to correctly cancel handlers when request cancelled (connection closed, etc.)
Try to extract value from request context when it was not found in gin context

Signed-off-by: Vladimir Stolyarov <[email protected]>
@thinkerou
Copy link
Member

@xakep666 thank you commit, please see #1736

@xakep666 xakep666 closed this Mar 9, 2019
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.

2 participants