Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Dec 23, 2023
1 parent c05f073 commit afc6d19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bumble/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,17 +591,17 @@ def on_hci_command_status_event(self, event):
return self.on_command_processed(event)

def on_hci_number_of_completed_packets_event(self, event):
for i, connection_handle in enumerate(event.connection_handles):
for connection_handle, num_completed_packets in zip(
event.connection_handles, event.num_completed_packets
):
if not (connection := self.connections.get(connection_handle)):
logger.warning(
'received packet completion event for unknown handle '
f'0x{connection_handle:04X}'
)
continue

connection.acl_packet_queue.on_packets_completed(
event.num_completed_packets[i]
)
connection.acl_packet_queue.on_packets_completed(num_completed_packets)

# Classic only
def on_hci_connection_request_event(self, event):
Expand Down

0 comments on commit afc6d19

Please sign in to comment.