Skip to content

fix(traffic): duplicate semaphore release when uploading #8211

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

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

KirCute
Copy link
Contributor

@KirCute KirCute commented Mar 23, 2025

#7948 没有考虑到分片上传失败会重新执行上传函数,导致信号量因被获取一次释放多次而 panic。
现将获取信号量放到线程内部,不好的点是上传过程中可能会创建大量空等待的线程,但总比 panic 要好。errgroup 的 onRetry 回调函数看了看源代码感觉不是很好用。

Fix #8180

@xhofe xhofe merged commit 4fcc3a1 into AlistGo:main Mar 27, 2025
12 checks passed
@KirCute KirCute deleted the fix/semaphore-duplicate-release branch March 27, 2025 15:16
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.

Alist v3.43.0 , 百度网盘上传程序闪退,回滚到 v3.42.0 后正常
2 participants