mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 08:35:10 +08:00
Merge pull request #169 from lanrenwo/audit_interval_ui
审计日志配置页-显示审计去重间隔秒数
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user