mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
fix: strategyStickySessions nil pointer
This commit is contained in:
parent
b8e9c3d55a
commit
aa0d174ccb
|
@ -147,7 +147,7 @@ func strategyStickySessions() strategyFn {
|
|||
}
|
||||
Sessions := make(map[string]map[string]Session)
|
||||
go func() {
|
||||
for true {
|
||||
for {
|
||||
time.Sleep(time.Second * 60)
|
||||
now := time.Now().Unix()
|
||||
for _, subMap := range Sessions {
|
||||
|
@ -174,7 +174,7 @@ func strategyStickySessions() strategyFn {
|
|||
session.time = now
|
||||
|
||||
var i int
|
||||
var res C.Proxy
|
||||
var res = proxies[0]
|
||||
for i := 0; i < length; i++ {
|
||||
idx := (session.idx + i) % length
|
||||
proxy := proxies[idx]
|
||||
|
|
Loading…
Reference in New Issue
Block a user