examples/bluetooth: Fix check for _conn_handle being None.

Fixes issue #10755.

Signed-off-by: Damien George <damien@micropython.org>
pull/8236/merge
Damien George 2023-02-15 14:14:49 +11:00
rodzic 41ed01f139
commit e1f211c6b5
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -179,7 +179,7 @@ class BLESimpleCentral:
# Disconnect from current device.
def disconnect(self):
if not self._conn_handle:
if self._conn_handle is None:
return
self._ble.gap_disconnect(self._conn_handle)
self._reset()

Wyświetl plik

@ -196,7 +196,7 @@ class BLETemperatureCentral:
# Disconnect from current device.
def disconnect(self):
if not self._conn_handle:
if self._conn_handle is None:
return
self._ble.gap_disconnect(self._conn_handle)
self._reset()