controlclient: set default TimeNow function
Panic on call to nil func found by expanded ipn/e2e_test. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
@ -147,6 +147,9 @@ func NewNoStart(opts Options) (*Client, error) {
|
||||
if opts.Logf == nil {
|
||||
opts.Logf = func(fmt string, args ...interface{}) {}
|
||||
}
|
||||
if opts.TimeNow == nil {
|
||||
opts.TimeNow = time.Now
|
||||
}
|
||||
c := &Client{
|
||||
direct: direct,
|
||||
timeNow: opts.TimeNow,
|
||||
|
Reference in New Issue
Block a user