From 4c572267b4b15f0abb18595c76a68364c48921b6 Mon Sep 17 00:00:00 2001 From: apoorvyadav1111 Date: Wed, 6 Nov 2024 01:22:45 +0530 Subject: [PATCH] added get in set --- internal/eval/store_eval.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/eval/store_eval.go b/internal/eval/store_eval.go index cd4bdc7f13..e7fc996d76 100644 --- a/internal/eval/store_eval.go +++ b/internal/eval/store_eval.go @@ -252,9 +252,7 @@ func evalSET(args []string, store *dstore.Store) *EvalResponse { exDurationMs = exDuration - utils.GetCurrentTime().UnixMilli() // If the expiry time is in the past, set exDurationMs to 0 // This will be used to signal immediate expiration - if exDurationMs < 0 { - exDurationMs = 0 - } + exDurationMs = int64(math.Max(0, float64(exDurationMs))) state = Initialized case XX: