Fix default port update handling

This commit is contained in:
Jeff Mitchell committed 2020-09-15 02:15:33 -04:00
1 parent a598fdfb13
commit eb88d0381a
2 files changed
+5 -2

No files matched your search

@@ -240,6 +240,9 @@ func (s Service) updateInRepo(ctx context.Context, scopeId, id string, mask []st
if name := item.GetName(); name != nil {
opts = append(opts, target.WithName(name.GetValue()))
}
if item.GetDefaultPort().GetValue() != 0 {
opts = append(opts, target.WithDefaultPort(item.GetDefaultPort().GetValue()))
}
version := item.GetVersion()
u, err := target.NewTcpTarget(scopeId, opts...)
if err != nil {