Skip to content

Commit

Permalink
Fixed connection lost
Browse files Browse the repository at this point in the history
  • Loading branch information
AskBojesen committed May 8, 2024
1 parent e7ebdbf commit a54b536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Plugin.BLE/Windows/Adapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private void Device_ConnectionStatusChanged(BluetoothLEDevice nativeDevice, obje
{
// device was powered off or went out of range. Call DisconnectDeviceNative to cleanup
// resources otherwise windows will not disconnect on a subsequent connect-disconnect.
DisconnectDeviceNative(disconnectedDevice);
((Device)disconnectedDevice).DisconnectInternal();
}
ConnectedDeviceRegistry.Remove(id, out _);
nativeDevice.ConnectionStatusChanged -= Device_ConnectionStatusChanged;
Expand Down Expand Up @@ -199,7 +199,7 @@ protected override IReadOnlyList<IDevice> GetBondedDevices()
this,
bluetoothLeDevice,
0, id);
devlist.Add(device);
devlist.Add(device);
Trace.Message("GetBondedDevices: {0}: {1}", dev.Id, dev.Name);
}
else
Expand Down

0 comments on commit a54b536

Please sign in to comment.