tailcfg: make MapResponse.ControlTime a pointer

Otherwise omitempty doesn't work.

This is wire-compatible with a non-pointer type, so switching
is safe, now and in the future.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2022-02-18 10:14:14 -08:00
committed by Josh Bleecher Snyder
parent bb93e29d5c
commit 8c3c5e80b7
3 changed files with 4 additions and 3 deletions

View File

@@ -772,7 +772,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*netm
go answerPing(c.logf, c.httpc, pr)
}
if !resp.ControlTime.IsZero() {
if resp.ControlTime != nil && !resp.ControlTime.IsZero() {
c.logf("netmap: control time is %v", resp.ControlTime.UTC().Format(time.RFC3339Nano))
}
if resp.KeepAlive {