Merge branch 'main' into fix_multiselect_negotiate_type

This commit is contained in:
Manu Sheel Gupta
2025-09-02 01:08:21 +05:30
committed by GitHub
15 changed files with 1252 additions and 70 deletions

View File

@ -343,7 +343,7 @@ class BasicHost(IHost):
:param peer_id: ID of the peer to check
:return: True if peer has an active connection, False otherwise
"""
return peer_id in self._network.connections
return len(self._network.get_connections(peer_id)) > 0
def get_peer_connection_info(self, peer_id: ID) -> INetConn | None:
"""
@ -352,4 +352,4 @@ class BasicHost(IHost):
:param peer_id: ID of the peer to get info for
:return: Connection object if peer is connected, None otherwise
"""
return self._network.connections.get(peer_id)
return self._network.get_connection(peer_id)