Add error handling to connect call

This commit is contained in:
Elara 2021-08-21 20:25:09 -07:00
parent d5f83f4643
commit d5c893b9d1

View File

@ -151,7 +151,10 @@ func connectByName() (*Device, error) {
return nil, ErrNoDevices
}
// Connect to device
out.device.Connect()
err = out.device.Connect()
if err != nil {
return nil, err
}
// Resolve characteristics
err = out.resolveChars()
if err != nil {