This commit is contained in:
Gilles Boccon-Gibod
2024-11-02 10:29:40 -07:00
parent b78f895143
commit b2864dac2d
2 changed files with 5 additions and 3 deletions

View File

@@ -1839,7 +1839,7 @@ class Session:
if self.is_initiator:
if self.pairing_method == PairingMethod.OOB:
self.send_pairing_random_command()
else:
elif self.pairing_method == PairingMethod.PASSKEY:
self.send_pairing_confirm_command()
else:
if self.pairing_method == PairingMethod.PASSKEY:

View File

@@ -370,10 +370,12 @@ class PumpedPacketSource(ParserSource):
self.parser.feed_data(packet)
except asyncio.CancelledError:
logger.debug('source pump task done')
if not self.terminated.done():
self.terminated.set_result(None)
break
except Exception as error:
logger.warning(f'exception while waiting for packet: {error}')
if not self.terminated.done():
self.terminated.set_exception(error)
break