Merge pull request #77 from mogenson/l2cap-on-event

Fix for 'Host' object has no attribute 'add_listener'
This commit is contained in:
Michael Mogenson
2022-11-22 09:39:04 -05:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -443,7 +443,10 @@ class ConsoleApp:
# Discover all services, characteristics and descriptors
self.append_to_output('discovering services...')
await self.connected_peer.discover_services()
self.append_to_output(f'found {len(self.connected_peer.services)} services, discovering charateristics...')
self.append_to_output(
f'found {len(self.connected_peer.services)} services,'
' discovering characteristics...'
)
await self.connected_peer.discover_characteristics()
self.append_to_output('found characteristics, discovering descriptors...')
for service in self.connected_peer.services:
+1 -1
View File
@@ -1224,7 +1224,7 @@ class ChannelManager:
self._host.remove_listener('disconnection', self.on_disconnection)
self._host = host
if host is not None:
host.add_listener('disconnection', self.on_disconnection)
host.on('disconnection', self.on_disconnection)
def find_channel(self, connection_handle, cid):
if connection_channels := self.channels.get(connection_handle):