mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
update
This commit is contained in:
@ -59,7 +59,7 @@ type distributedlock struct {
|
||||
func NewDistributedLocker(ctx context.Context, key string, clients ...redis.Client) *distributedlock {
|
||||
expire := defaultExpire
|
||||
if deadline, ok := ctx.Deadline(); ok {
|
||||
expire = deadline.Sub(time.Now())
|
||||
expire = time.Until(deadline)
|
||||
}
|
||||
|
||||
locker := &distributedlock{
|
||||
|
Reference in New Issue
Block a user