Closed
Description
BluetoothSocket.InputStream is a Stream and Stream.Read should throw a System.IO.IOException
Steps to Reproduce
- Create SPP RFCOMM Connection
_adapter = BluetoothAdapter.DefaultAdapter;
// ...
var device = _adapter.GetRemoteDevice(address);
var socket = device.CreateRfcommSocketToServiceRecord(UUID.FromString("00001101-0000-1000-8000-00805F9B34FB"));
await socket.ConnectAsync();
var stream = socket.InputStream;
- start read operation
try {
var buffer = new byte[128];
var read = stream.Read(buffer, 0, buffer.Length);
// ...
}
catch(IOException e) {
throw;
}
catch (Exception e)
{
// Java.IO.IOException...
throw;
}
- turn remote device off and wait few seconds
Expected Behavior
System.IO.IOException
Actual Behavior
Java.IO.IOException