controlclient: handle nil Logf option

crawshaw/br1
David Crawshaw 4 years ago
parent ea11d58e96
commit 2b947b3b40

@ -142,6 +142,9 @@ func NewNoStart(opts Options) (*Client, error) {
if err != nil {
return nil, err
}
if opts.Logf == nil {
opts.Logf = func(fmt string, args ...interface{}) {}
}
c := &Client{
direct: direct,
timeNow: opts.TimeNow,

Loading…
Cancel
Save