diff options
Diffstat (limited to 'control/controlclient/direct.go')
| -rw-r--r-- | control/controlclient/direct.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/control/controlclient/direct.go b/control/controlclient/direct.go index 0a7105cb3..4cf47a2ad 100644 --- a/control/controlclient/direct.go +++ b/control/controlclient/direct.go @@ -535,7 +535,7 @@ func inTest() bool { return flag.Lookup("test.v") != nil } // // maxPolls is how many network maps to download; common values are 1 // or -1 (to keep a long-poll query open to the server). -func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(*netmap.NetworkMap)) error { +func (c *Direct) PollNetMap(ctx context.Context, maxPolls int, cb func(netmap.NetworkMapView)) error { return c.sendMapRequest(ctx, maxPolls, cb) } @@ -552,7 +552,7 @@ func (c *Direct) SendLiteMapUpdate(ctx context.Context) error { const pollTimeout = 120 * time.Second // cb nil means to omit peers. -func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*netmap.NetworkMap)) error { +func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(netmap.NetworkMapView)) error { c.mu.Lock() persist := c.persist serverURL := c.serverURL @@ -822,7 +822,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*netm c.expiry = &nm.Expiry c.mu.Unlock() - cb(nm) + cb(nm.View()) } if ctx.Err() != nil { return ctx.Err() |
