controlclient: handle nil Logf option

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

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

Loading…
Cancel
Save