Change pool, change mux connection close ,change copy buffer

This commit is contained in:
ffdfgdfg
2019-08-30 20:05:09 +08:00
parent 41c282b38b
commit bb2cffe10a
11 changed files with 257 additions and 123 deletions

View File

@@ -2,7 +2,7 @@ package mux
import (
"errors"
"github.com/cnlh/nps/lib/pool"
"github.com/cnlh/nps/lib/common"
"sync"
)
@@ -63,7 +63,7 @@ func (entry *sliceEntry) Clear() bool {
return false
}
for i := 0; i < entry.Size(); i++ {
pool.CopyBuff.Put(entry.element[i].val)
common.CopyBuff.Put(entry.element[i].val)
entry.element[i] = nil
}
entry.element = nil