fix race condition

This commit is contained in:
ginuerzh
2023-10-19 23:47:47 +08:00
parent f2fd6554ad
commit cc4310106b
29 changed files with 157 additions and 156 deletions

View File

@ -33,7 +33,7 @@ func CopyBuffer(dst io.Writer, src io.Reader, bufSize int) error {
buf := bufpool.Get(bufSize)
defer bufpool.Put(buf)
_, err := io.CopyBuffer(dst, src, *buf)
_, err := io.CopyBuffer(dst, src, buf)
return err
}