DotNet-BlueZ icon indicating copy to clipboard operation
DotNet-BlueZ copied to clipboard

ConnectAsync() is blocking Task

Open rkops-bd opened this issue 4 years ago • 0 comments

'await device.ConnectAsync(); await device.WaitForPropertyValueAsync("Connected", value: true, timeout);'

Line 2 will never be invocked when device can't connect (because it is out of range, for example). IN this case the BlueZ stack will throw an exception -> 'org.bluez.Error.Failed: Software caused connection abort', but does not respect the timeout sit in the second line.

rkops-bd avatar Dec 01 '20 19:12 rkops-bd