mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-22 12:58:37 +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 {
|
if opts.Logf == nil {
|
||||||
opts.Logf = func(fmt string, args ...interface{}) {}
|
opts.Logf = func(fmt string, args ...interface{}) {}
|
||||||
}
|
}
|
||||||
|
if opts.TimeNow == nil {
|
||||||
|
opts.TimeNow = time.Now
|
||||||
|
}
|
||||||
c := &Client{
|
c := &Client{
|
||||||
direct: direct,
|
direct: direct,
|
||||||
timeNow: opts.TimeNow,
|
timeNow: opts.TimeNow,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user