update completed sessions

This commit is contained in:
Jason
2019-08-10 20:39:04 +08:00
parent 22d83027bb
commit 79d8309b34
2 changed files with 14 additions and 14 deletions

View File

@@ -115,12 +115,12 @@ func (h *tcpHandler) relay(localConn, remoteConn net.Conn, sess *stats.Session)
<-upCh // Wait for UpLink done.
// add -1
atomic.AddInt64(&activeTCPConnections, -1)
if h.sessionStater != nil {
h.sessionStater.RemoveSession(localConn)
}
// add -1
atomic.AddInt64(&activeTCPConnections, -1)
}
func (h *tcpHandler) Handle(localConn net.Conn, target *net.TCPAddr) error {