From 8417361bceb8810cd400263d1758bc47d56d414f Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Fri, 27 Sep 2019 15:00:25 +0100 Subject: [PATCH] Set registry TTL to seconds, not the nanoseconds --- registry/handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/handler/handler.go b/registry/handler/handler.go index e828ecdb..68d4523b 100644 --- a/registry/handler/handler.go +++ b/registry/handler/handler.go @@ -28,7 +28,7 @@ func (r *Registry) GetService(ctx context.Context, req *pb.GetRequest, rsp *pb.G func (r *Registry) Register(ctx context.Context, req *pb.Service, rsp *pb.EmptyResponse) error { var regOpts []registry.RegisterOption - ttl := time.Duration(req.Options.Ttl) + ttl := time.Duration(req.Options.Ttl) * time.Second regOpts = append(regOpts, registry.RegisterTTL(ttl)) err := r.Registry.Register(service.ToService(req), regOpts...)