Bring back debug.FreeOSMemory() call

This commit is contained in:
M. Mert Yildiran 2022-04-20 17:12:33 +03:00
parent 0e88584227
commit 1cce863bbb
No known key found for this signature in database
GPG Key ID: D42ADB236521BF7A

View File

@ -2,6 +2,7 @@ package api
import (
"runtime"
"runtime/debug"
"sync"
"time"
@ -42,6 +43,7 @@ func (streamMap *TcpStreamMap) CloseTimedoutTcpStreamChannels() {
for {
<-ticker.C
debug.FreeOSMemory()
streamMap.Streams.Range(func(key interface{}, value interface{}) bool {
stream := value.(*TcpStream)
if stream.ProtoIdentifier.Protocol == nil {