mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
fix bug
This commit is contained in:
@@ -109,7 +109,6 @@ func (c *Node) Start() error {
|
|||||||
time.Sleep(time.Duration(c.config.UpdatePeriodic) * time.Second)
|
time.Sleep(time.Duration(c.config.UpdatePeriodic) * time.Second)
|
||||||
_ = c.userReportPeriodic.Start()
|
_ = c.userReportPeriodic.Start()
|
||||||
}()
|
}()
|
||||||
if c.config.EnableIpRecorder {
|
|
||||||
c.onlineIpReportPeriodic = &task.Periodic{
|
c.onlineIpReportPeriodic = &task.Periodic{
|
||||||
Interval: time.Duration(c.config.UpdatePeriodic) * 30,
|
Interval: time.Duration(c.config.UpdatePeriodic) * 30,
|
||||||
Execute: c.onlineIpReport,
|
Execute: c.onlineIpReport,
|
||||||
@@ -120,7 +119,6 @@ func (c *Node) Start() error {
|
|||||||
time.Sleep(time.Duration(c.config.UpdatePeriodic) * time.Second)
|
time.Sleep(time.Duration(c.config.UpdatePeriodic) * time.Second)
|
||||||
_ = c.onlineIpReportPeriodic.Start()
|
_ = c.onlineIpReportPeriodic.Start()
|
||||||
}()
|
}()
|
||||||
}
|
|
||||||
runtime.GC()
|
runtime.GC()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -389,6 +387,7 @@ func (c *Node) userInfoMonitor() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Node) onlineIpReport() (err error) {
|
func (c *Node) onlineIpReport() (err error) {
|
||||||
|
if c.config.EnableIpRecorder {
|
||||||
onlineIp, err := c.server.GetOnlineIps(c.Tag)
|
onlineIp, err := c.server.GetOnlineIps(c.Tag)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Print(err)
|
log.Print(err)
|
||||||
@@ -419,6 +418,9 @@ func (c *Node) onlineIpReport() (err error) {
|
|||||||
} else {
|
} else {
|
||||||
c.server.ClearOnlineIps(c.Tag)
|
c.server.ClearOnlineIps(c.Tag)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
c.server.ClearOnlineIps(c.Tag)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user