Merge pull request #169 from lanrenwo/audit_interval_ui

审计日志配置页-显示审计去重间隔秒数
This commit is contained in:
bjdgyc
2022-10-31 14:54:41 +08:00
committed by GitHub
4 changed files with 14 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ import (
"net/http"
"regexp"
"github.com/bjdgyc/anylink/base"
"github.com/bjdgyc/anylink/dbdata"
)
@@ -82,6 +83,7 @@ func SetOtherAuditLog(w http.ResponseWriter, r *http.Request) {
RespError(w, RespInternalErr, err)
return
}
data.AuditInterval = base.Cfg.AuditInterval
RespSucess(w, data)
}

View File

@@ -21,8 +21,9 @@ type SettingSmtp struct {
}
type SettingAuditLog struct {
LifeDay int `json:"life_day"`
ClearTime string `json:"clear_time"`
AuditInterval int `json:"audit_interval"`
LifeDay int `json:"life_day"`
ClearTime string `json:"clear_time"`
}
type SettingOther struct {

View File

@@ -244,6 +244,10 @@ func (cs *ConnSession) Close() {
cs.Sess.LastLogin = time.Now()
cs.Sess.CSess = nil
if cs.IpAuditPool != nil {
cs.IpAuditPool.Release()
}
dSess := cs.GetDtlsSession()
if dSess != nil {
dSess.Close()