From e853862c6b864cefba65e3046419c03cf4a404af Mon Sep 17 00:00:00 2001 From: Kenshin <35095889+kqzh@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:30:35 +0800 Subject: [PATCH] fix: reconnect options (#374) --- pkg/nebula/meta_client.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/nebula/meta_client.go b/pkg/nebula/meta_client.go index 42005aa7..03c14719 100644 --- a/pkg/nebula/meta_client.go +++ b/pkg/nebula/meta_client.go @@ -60,7 +60,8 @@ type ( } metaClient struct { - client *meta.MetaServiceClient + client *meta.MetaServiceClient + options []Option } ) @@ -81,7 +82,10 @@ func newMetaConnection(endpoint string, options ...Option) (*metaClient, error) return nil, err } metaServiceClient := meta.NewMetaServiceClientFactory(transport, pf) - mc := &metaClient{client: metaServiceClient} + mc := &metaClient{ + client: metaServiceClient, + options: options, + } if err := mc.connect(); err != nil { return nil, err } @@ -93,7 +97,7 @@ func (m *metaClient) reconnect(endpoint string) error { return err } - transport, pf, err := buildClientTransport(endpoint) + transport, pf, err := buildClientTransport(endpoint, m.options...) if err != nil { return err }