Fix data race

This commit is contained in:
Timmy Welch 2024-08-10 16:08:38 -07:00
parent 88dd4778eb
commit 003cba6e1b

View File

@ -31,7 +31,6 @@ func getBuf(size, capacity int) []uint8 {
buf := *bufPool.Get().(*[]uint8) buf := *bufPool.Get().(*[]uint8)
if cap(buf) < capacity { if cap(buf) < capacity {
bufPool.Put(&buf)
buf = make([]uint8, capacity) buf = make([]uint8, capacity)
} }