From 37f3e6fa2d8162e42a493e939e9d359a6bcc5774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 20 Mar 2022 16:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=9F=A5=E8=AF=A2=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E8=B6=85=E6=97=B6=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/caches/list_file.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/caches/list_file.go b/internal/caches/list_file.go index 83b8462..406eb07 100644 --- a/internal/caches/list_file.go +++ b/internal/caches/list_file.go @@ -132,9 +132,7 @@ func (this *FileList) Exist(hash string) (bool, error) { return true, nil } - ctx, cancelCtx := context.WithTimeout(context.Background(), 500*time.Millisecond) - rows, err := db.existsByHashStmt.QueryContext(ctx, hash, time.Now().Unix()) - cancelCtx() + rows, err := db.existsByHashStmt.Query(hash, time.Now().Unix()) if err != nil { if err == context.DeadlineExceeded { return false, nil