Fix segfault due to using wrong opts struct

This commit is contained in:
Elara 2021-08-21 20:27:31 -07:00
parent 91fbe718e5
commit d228b6cf60

View File

@ -64,7 +64,7 @@ func Connect(opts *Options) (*Device, error) {
// If such device does not exist // If such device does not exist
if errors.Is(err, ErrNoDevices) { if errors.Is(err, ErrNoDevices) {
// Attempt to pair device // Attempt to pair device
dev, err = pair(dev.opts.PairTimeout) dev, err = pair(opts.PairTimeout)
} }
if err != nil { if err != nil {
return nil, err return nil, err