ipn: move Options.ServerURL into Prefs.
We can't rely on a frontend to provide a control server URL, so this naturally belongs in server-persisted state. Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
committed by
Dave Anderson
parent
45d687e213
commit
cf1e386cbd
+1
-1
@@ -149,13 +149,13 @@ func (b *LocalBackend) Start(opts Options) error {
|
||||
hi.Services = b.hiCache.Services // keep any previous session
|
||||
b.hiCache = hi
|
||||
b.state = NoState
|
||||
b.serverURL = opts.ServerURL
|
||||
|
||||
if err := b.loadStateWithLock(opts.StateKey, opts.Prefs); err != nil {
|
||||
b.mu.Unlock()
|
||||
return fmt.Errorf("loading requested state: %v", err)
|
||||
}
|
||||
|
||||
b.serverURL = b.prefs.ControlURL
|
||||
hi.RoutableIPs = append(hi.RoutableIPs, b.prefs.AdvertiseRoutes...)
|
||||
|
||||
b.notify = opts.Notify
|
||||
|
||||
Reference in New Issue
Block a user