From 522e04840c6a1d76d677023803faa5594397b0e9 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Mon, 3 Aug 2020 22:44:29 +0100 Subject: [PATCH] ensure register ttl and interval are set --- options.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/options.go b/options.go index c2e00f5..34eb2e1 100644 --- a/options.go +++ b/options.go @@ -66,15 +66,17 @@ func MaxMsgSize(s int) server.Option { func newOptions(opt ...server.Option) server.Options { opts := server.Options{ - Codecs: make(map[string]codec.NewCodec), - Metadata: map[string]string{}, - Broker: http.NewBroker(), - Registry: mdns.NewRegistry(), - Transport: transport.DefaultTransport, - Address: server.DefaultAddress, - Name: server.DefaultName, - Id: server.DefaultId, - Version: server.DefaultVersion, + Codecs: make(map[string]codec.NewCodec), + Metadata: map[string]string{}, + Broker: http.NewBroker(), + Registry: mdns.NewRegistry(), + Transport: transport.DefaultTransport, + Address: server.DefaultAddress, + Name: server.DefaultName, + Id: server.DefaultId, + Version: server.DefaultVersion, + RegisterInterval: server.DefaultRegisterInterval, + RegisterTTL: server.DefaultRegisterTTL, } for _, o := range opt {