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>pull/166/head
parent
1dee36a984
commit
d99498bee2
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue