mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 18:08:14 -05:00
fix bug
This commit is contained in:
parent
aee568d31c
commit
6c1ef37f8a
@ -20,6 +20,7 @@ type Controller struct {
|
|||||||
limiter *limiter.Limiter
|
limiter *limiter.Limiter
|
||||||
traffic map[string]int64
|
traffic map[string]int64
|
||||||
userList []panel.UserInfo
|
userList []panel.UserInfo
|
||||||
|
info *panel.NodeInfo
|
||||||
ipRecorder iprecoder.IpRecorder
|
ipRecorder iprecoder.IpRecorder
|
||||||
nodeInfoMonitorPeriodic *task.Task
|
nodeInfoMonitorPeriodic *task.Task
|
||||||
userReportPeriodic *task.Task
|
userReportPeriodic *task.Task
|
||||||
@ -86,6 +87,7 @@ func (c *Controller) Start() error {
|
|||||||
}
|
}
|
||||||
log.WithField("tag", c.tag).Infof("Added %d new users", added)
|
log.WithField("tag", c.tag).Infof("Added %d new users", added)
|
||||||
c.startTasks(node)
|
c.startTasks(node)
|
||||||
|
c.info = node
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,6 +144,7 @@ func (c *Controller) nodeInfoMonitor() (err error) {
|
|||||||
_ = c.userReportPeriodic.Start(false)
|
_ = c.userReportPeriodic.Start(false)
|
||||||
}
|
}
|
||||||
log.WithField("tag", c.tag).Infof("Added %d new users", len(c.userList))
|
log.WithField("tag", c.tag).Infof("Added %d new users", len(c.userList))
|
||||||
|
c.info = newNodeInfo
|
||||||
// exit
|
// exit
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -169,6 +170,7 @@ func (c *Controller) nodeInfoMonitor() (err error) {
|
|||||||
_, err = c.server.AddUsers(&vCore.AddUsersParams{
|
_, err = c.server.AddUsers(&vCore.AddUsersParams{
|
||||||
Tag: c.tag,
|
Tag: c.tag,
|
||||||
Config: c.Options,
|
Config: c.Options,
|
||||||
|
NodeInfo: c.info,
|
||||||
UserInfo: added,
|
UserInfo: added,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user