diff --git a/tap/passive_tapper.go b/tap/passive_tapper.go index d4aec99f3..2930cf284 100644 --- a/tap/passive_tapper.go +++ b/tap/passive_tapper.go @@ -18,6 +18,7 @@ import ( "os" "os/signal" "runtime" + _debug "runtime/debug" "runtime/pprof" "strconv" "strings" @@ -218,6 +219,7 @@ func closeTimedoutTcpStreamChannels() { maxNumberOfGoroutines = GetMaxNumberOfGoroutines() TcpStreamChannelTimeoutMs := GetTcpChannelTimeoutMs() for { + _debug.FreeOSMemory() time.Sleep(10 * time.Millisecond) streams.Range(func(key interface{}, value interface{}) bool { streamWrapper := value.(*tcpStreamWrapper)