From 539e2c528e2cf964b6caad9e60af6c602e92338f Mon Sep 17 00:00:00 2001 From: ycc Date: Thu, 31 Aug 2023 23:43:36 +0200 Subject: [PATCH] fix router constructor --- server/router.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/router.go b/server/router.go index 3b9ba3c..cfdd203 100644 --- a/server/router.go +++ b/server/router.go @@ -17,15 +17,16 @@ type RedisRouter struct { Context context.Context } -func NewRedisRouter(server *Identity, url string, password string, db int) *RedisRouter { +func NewRedisRouter(server *Identity, redisUrl string, password string, db int, invitationTimeout int) *RedisRouter { var r RedisRouter r.ServerIdentity = server r.Name = "Redis" r.Client = redis.NewClient(&redis.Options{ - Addr: url, + Addr: redisUrl, Password: password, DB: db, }) + r.InvitationTimeout = invitationTimeout r.Context = context.Background() return &r }