Skip to content

Commit

Permalink
fix: reconnect options (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
kqzh authored Oct 25, 2023
1 parent e5b9ae0 commit e853862
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/nebula/meta_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ type (
}

metaClient struct {
client *meta.MetaServiceClient
client *meta.MetaServiceClient
options []Option
}
)

Expand All @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit e853862

Please sign in to comment.