Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Reduce ctx timeout duration

Neeraj Gupta6fc24f6900db
diff --git a/server/pkg/controller/filedata/replicate.go b/server/pkg/controller/filedata/replicate.go
index 668ae844aa..fa34aa2e9b 100644
--- a/server/pkg/controller/filedata/replicate.go
+++ b/server/pkg/controller/filedata/replicate.go
@@ -58,7 +58,7 @@ func (c *Controller) replicate(i int) {
func (c *Controller) tryReplicate() error {
newLockTime := enteTime.MicrosecondsAfterMinutes(60)
- ctx, cancelFun := context.WithTimeout(context.Background(), 50*time.Minute)
+ ctx, cancelFun := context.WithTimeout(context.Background(), 20*time.Minute)
defer cancelFun()
row, err := c.Repo.GetPendingSyncDataAndExtendLock(ctx, newLockTime, false)
if err != nil {