forked from Elara6331/infinitime
Add error handling to connect call
This commit is contained in:
parent
7f19dfb354
commit
91fbe718e5
@ -151,7 +151,10 @@ func connectByName() (*Device, error) {
|
|||||||
return nil, ErrNoDevices
|
return nil, ErrNoDevices
|
||||||
}
|
}
|
||||||
// Connect to device
|
// Connect to device
|
||||||
out.device.Connect()
|
err = out.device.Connect()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
// Resolve characteristics
|
// Resolve characteristics
|
||||||
err = out.resolveChars()
|
err = out.resolveChars()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user