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

Remove unused variable outstandingReadBufs.

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