From 9200e02eb5ed8d4abcdec1cf5c32e5f898bb6bba Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 9 Nov 2015 10:42:09 +0200 Subject: [PATCH] Consistency fix: readersPool->readerPool, writersPool->writerPool --- server.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server.go b/server.go index a2e0404..1a4ec11 100644 --- a/server.go +++ b/server.go @@ -71,8 +71,8 @@ type Server struct { serverName atomic.Value ctxPool sync.Pool - readersPool sync.Pool - writersPool sync.Pool + readerPool sync.Pool + writerPool sync.Pool } // TimeoutHandler creates RequestHandler, which returns StatusRequestTimeout @@ -669,7 +669,7 @@ func acquireByteReader(ctx *RequestCtx) (*RequestCtx, *bufio.Reader, error) { } func acquireReader(ctx *RequestCtx) *bufio.Reader { - v := ctx.s.readersPool.Get() + v := ctx.s.readerPool.Get() if v == nil { n := ctx.s.ReadBufferSize if n <= 0 { @@ -684,11 +684,11 @@ func acquireReader(ctx *RequestCtx) *bufio.Reader { func releaseReader(ctx *RequestCtx, r *bufio.Reader) { r.Reset(nil) - ctx.s.readersPool.Put(r) + ctx.s.readerPool.Put(r) } func acquireWriter(ctx *RequestCtx) *bufio.Writer { - v := ctx.s.writersPool.Get() + v := ctx.s.writerPool.Get() if v == nil { n := ctx.s.WriteBufferSize if n <= 0 { @@ -703,7 +703,7 @@ func acquireWriter(ctx *RequestCtx) *bufio.Writer { func releaseWriter(ctx *RequestCtx, w *bufio.Writer) { w.Reset(nil) - ctx.s.writersPool.Put(w) + ctx.s.writerPool.Put(w) } var globalCtxID uint64