Skip to content

fix: use context copy in async goroutine - #383

Open
krisxia0506 wants to merge 1 commit into
coaidev:mainfrom
krisxia0506:fix/context-copy-in-goroutine
Open

krisxia0506 wants to merge 1 commit into
coaidev:mainfrom
krisxia0506:fix/context-copy-in-goroutine

Conversation

@krisxia0506

@krisxia0506 krisxia0506 commented Nov 14, 2025

Copy link
Copy Markdown

Using c.Copy() in an asynchronous goroutine to safely access gin.Context, avoiding race condition issues when accessing the context after the original request has completed.

Close #382

Using c.Copy() in an asynchronous goroutine to safely access gin.Context,
avoiding race condition issues when accessing the context after the original request has completed.
@krisxia0506

Copy link
Copy Markdown
Author

@Sh1n3zZ 你好,能帮忙看下这个PR么

@Issues-translate-bot

Copy link
Copy Markdown

Bot detected the issue body's language is not English, translate it automatically.


@Sh1n3zZ Hello, can you help me check this PR?

This branch has not been deployed

No deployments
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.

CollectQuota 在 goroutine 中使用被复用的 *gin.Context 导致 utils.GetDBFromContext 报错 / panic

3 participants