async def garbage_collect_connections_task(self) -> None:
    '\n        Periodically checks for connections with no activity (have not sent us any data), and removes them,\n        to allow room for other peers.\n        '
    while True:
        (await asyncio.sleep(600))
        to_remove: List[WSGreenBerryConnection] = []
        for connection in self.all_connections.values():
            if ((self._local_type == NodeType.FULL_NODE) and (connection.connection_type == NodeType.FULL_NODE)):
                if ((time.time() - connection.last_message_time) > 1800):
                    to_remove.append(connection)
        for connection in to_remove:
            self.log.debug(f'Garbage collecting connection {connection.peer_host} due to inactivity')
            (await connection.close())
        to_remove_ban = []
        for (peer_ip, ban_until_time) in self.banned_peers.items():
            if (time.time() > ban_until_time):
                to_remove_ban.append(peer_ip)
        for peer_ip in to_remove_ban:
            del self.banned_peers[peer_ip]
Periodically checks for connections with no activity (have not sent us any data), and removes them,
to allow room for other peers.
async def garbage_collect_connections_task(self) -> None:
    '\n        Periodically checks for connections with no activity (have not sent us any data), and removes them,\n        to allow room for other peers.\n        '
    while True:
        (await asyncio.sleep(600))
        to_remove: List[WSGreenBerryConnection] = []
        for connection in self.all_connections.values():
            if ((self._local_type == NodeType.FULL_NODE) and (connection.connection_type == NodeType.FULL_NODE)):
                if ((time.time() - connection.last_message_time) > 1800):
                    to_remove.append(connection)
        for connection in to_remove:
            self.log.debug(f'Garbage collecting connection {connection.peer_host} due to inactivity')
            (await connection.close())
        to_remove_ban = []
        for (peer_ip, ban_until_time) in self.banned_peers.items():
            if (time.time() > ban_until_time):
                to_remove_ban.append(peer_ip)
        for peer_ip in to_remove_ban:
            del self.banned_peers[peer_ip]