mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-21 12:28:39 +00:00
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:
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…
x
Reference in New Issue
Block a user