mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-08-11 23:02:12 +08:00
fix bug when recover memory
This commit is contained in:
@@ -30,7 +30,12 @@ func (sbp *sliceBufferPool) Enqueue(buffer []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
sbp.queue <- buffer
|
||||
select {
|
||||
case sbp.queue <- buffer:
|
||||
return
|
||||
default:
|
||||
buffer = nil
|
||||
}
|
||||
}
|
||||
|
||||
func (sbp *sliceBufferPool) DequeueWithInit(initSize int) (buffer []byte) {
|
||||
|
Reference in New Issue
Block a user