Commit 5d038d72 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Remove unused variable outstandingReadBufs.

parent c4b6b794
...@@ -44,11 +44,10 @@ type Server struct { ...@@ -44,11 +44,10 @@ type Server struct {
reqPool sync.Pool reqPool sync.Pool
// Pool for raw requests data // Pool for raw requests data
readPool sync.Pool readPool sync.Pool
reqMu sync.Mutex reqMu sync.Mutex
reqReaders int reqReaders int
outstandingReadBufs int kernelSettings InitIn
kernelSettings InitIn
singleReader bool singleReader bool
canSplice bool canSplice bool
...@@ -232,7 +231,6 @@ func (ms *Server) readRequest(exitIdle bool) (req *request, code Status) { ...@@ -232,7 +231,6 @@ func (ms *Server) readRequest(exitIdle bool) (req *request, code Status) {
} }
req = ms.reqPool.Get().(*request) req = ms.reqPool.Get().(*request)
dest := ms.readPool.Get().([]byte) dest := ms.readPool.Get().([]byte)
ms.outstandingReadBufs++
ms.reqReaders++ ms.reqReaders++
ms.reqMu.Unlock() ms.reqMu.Unlock()
...@@ -258,7 +256,6 @@ func (ms *Server) readRequest(exitIdle bool) (req *request, code Status) { ...@@ -258,7 +256,6 @@ func (ms *Server) readRequest(exitIdle bool) (req *request, code Status) {
ms.reqMu.Lock() ms.reqMu.Lock()
if !gobbled { if !gobbled {
ms.outstandingReadBufs--
ms.readPool.Put(dest) ms.readPool.Put(dest)
dest = nil dest = nil
} }
...@@ -286,7 +283,6 @@ func (ms *Server) returnRequest(req *request) { ...@@ -286,7 +283,6 @@ func (ms *Server) returnRequest(req *request) {
if req.bufferPoolInputBuf != nil { if req.bufferPoolInputBuf != nil {
ms.readPool.Put(req.bufferPoolInputBuf) ms.readPool.Put(req.bufferPoolInputBuf)
req.bufferPoolInputBuf = nil req.bufferPoolInputBuf = nil
ms.outstandingReadBufs--
} }
ms.reqPool.Put(req) ms.reqPool.Put(req)
ms.reqMu.Unlock() ms.reqMu.Unlock()
......
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