From 9b8d191bb115c8e9aa34fb4803f53ce20371b523 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 30 Sep 2019 20:09:35 -0700 Subject: [PATCH] Locator fix --- go/pkg/zerotier/locator.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/go/pkg/zerotier/locator.go b/go/pkg/zerotier/locator.go index cec72f223..8c3beaaa2 100644 --- a/go/pkg/zerotier/locator.go +++ b/go/pkg/zerotier/locator.go @@ -147,6 +147,7 @@ func NewLocatorFromBytes(b []byte) (*Locator, error) { loc.Virtual = append(loc.Virtual, id) } } + loc.Bytes = b return &loc, nil } @@ -185,9 +186,6 @@ func (l *Locator) UnmarshalJSON(j []byte) error { if err != nil { return err } - l.Identity = tmp.Identity - l.Physical = tmp.Physical - l.Virtual = tmp.Virtual - l.Bytes = bytes.Bytes + *l = *tmp return nil }