Commit 3759af98 authored by Steven Allen's avatar Steven Allen

faster bootstrap buffer check

parent 932f0384
...@@ -102,7 +102,7 @@ func (b *Buffer) getPool() *BufferPool { ...@@ -102,7 +102,7 @@ func (b *Buffer) getPool() *BufferPool {
} }
func (b *Buffer) returnBuf() { func (b *Buffer) returnBuf() {
if cap(b.buf) > 0 && &b.buf[:1][0] != &b.bootstrap[0] { if cap(b.buf) > len(b.bootstrap) {
b.getPool().Put(b.buf) b.getPool().Put(b.buf)
} }
b.buf = nil b.buf = nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment