Skip to content

Commit

Permalink
update tj mgr
Browse files Browse the repository at this point in the history
  • Loading branch information
orvice committed May 6, 2024
1 parent ec28058 commit 8a4ffd3
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions server/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ func NewUserManager() ([]*UserManager, error) {
if err != nil {
return nil, err
}
tms, err := getTrojanMgrs()
if err != nil {
return nil, err
}
tms, tjErr := getTrojanMgrs()

ums := make([]*UserManager, len(vms)+len(tms))
for k, v := range vms {
Expand All @@ -46,15 +43,16 @@ func NewUserManager() ([]*UserManager, error) {
targetType: v2ray,
}
}

for k, v := range tms {
ums[len(vms)+k] = &UserManager{
users: make(map[int64]musdk.User),
usersMu: new(sync.RWMutex),
ctx: ctx,
cancel: cancel,
tm: v,
targetType: trojan,
if tjErr == nil {
for k, v := range tms {
ums[len(vms)+k] = &UserManager{
users: make(map[int64]musdk.User),
usersMu: new(sync.RWMutex),
ctx: ctx,
cancel: cancel,
tm: v,
targetType: trojan,
}
}
}

Expand Down

0 comments on commit 8a4ffd3

Please sign in to comment.