Skip to content

Commit

Permalink
Revert "Create buffers of input size instead of *2"
Browse files Browse the repository at this point in the history
This reverts commit 3603c49.
  • Loading branch information
raghav-stripe committed Feb 15, 2024
1 parent 3603c49 commit b7693f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/transport/http_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,10 @@ func newFramer(conn net.Conn, writeBufferSize, readBufferSize int, sharedWriteBu
return f
}

func getWriteBufferPool(size int) *sync.Pool {
func getWriteBufferPool(writeBufferSize int) *sync.Pool {
writeBufferMutex.Lock()
defer writeBufferMutex.Unlock()
size := writeBufferSize * 2
pool, ok := writeBufferPoolMap[size]
if ok {
return pool
Expand Down

0 comments on commit b7693f2

Please sign in to comment.