mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-08 05:19:54 +00:00
fix: expire time error
This commit is contained in:
parent
839b15c22c
commit
5397720430
@ -229,7 +229,7 @@ func pushIP(email string, ip string, deviceLimit int, g *GlobalLimit) {
|
|||||||
|
|
||||||
// check ttl, if ttl == -1, then set expire time.
|
// check ttl, if ttl == -1, then set expire time.
|
||||||
if g.R.TTL(ctx, email).Val() == -1 {
|
if g.R.TTL(ctx, email).Val() == -1 {
|
||||||
if err := g.R.Expire(ctx, email, time.Duration(g.Expiry)*time.Minute).Err(); err != nil {
|
if err := g.R.Expire(ctx, email, time.Duration(g.Expiry)*time.Second).Err(); err != nil {
|
||||||
newError(fmt.Errorf("redis: %v", err)).AtError().WriteToLog()
|
newError(fmt.Errorf("redis: %v", err)).AtError().WriteToLog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user