Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
我也是go半吊子,用 pprof 看了一下
可能是存在goroutine泄漏,代码里是向conChk发送两次1,但只接收一次
删除与defer重复的260 261行
dst.Close()
conChk <- 1
仅解决一半的泄漏问题
一顿copliot后:
测试copliot的代码,结果在chan处堵塞的goroutine与io.Copy处的goroutine保持一致(算修好了吧)
go.mod go.sum 处的修改是go mod tidy自动改的