Skip to content

fix: remove unnecessary wg.Done - #104

Merged
M09Ic merged 1 commit into
chainreactors:masterfrom
BaiMeow:patch-1
Jan 13, 2025
Merged

fix: remove unnecessary wg.Done#104
M09Ic merged 1 commit into
chainreactors:masterfrom
BaiMeow:patch-1

Conversation

@BaiMeow

@BaiMeow BaiMeow commented Jan 7, 2025

Copy link
Copy Markdown
Contributor

golang panic 的时候是会执行defer块内的东西的,没必要在异常处理这里再次wg.Done
https://go.dev/play/p/K0RrI4BEsck

@M09Ic
M09Ic merged commit 0c8eab5 into chainreactors:master Jan 13, 2025
@M09Ic

M09Ic commented Jan 13, 2025

Copy link
Copy Markdown
Contributor

LGTM!

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