Skip to content

Commit

Permalink
remove unused, broken session limiter
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <[email protected]>
  • Loading branch information
andrewwhitehead committed Feb 8, 2022
1 parent 747b88c commit ea52011
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions aries_cloudagent/transport/inbound/manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Inbound transport manager."""

import asyncio
import logging
import uuid
from collections import OrderedDict
Expand Down Expand Up @@ -43,7 +42,6 @@ def __init__(
self.registered_transports = {}
self.running_transports = {}
self.sessions = OrderedDict()
self.session_limit: asyncio.Semaphore = None
self.task_queue = TaskQueue()
self.undelivered_queue: DeliveryQueue = None

Expand All @@ -68,8 +66,6 @@ async def setup(self):
if self.profile.context.settings.get("transport.enable_undelivered_queue"):
self.undelivered_queue = DeliveryQueue()

# self.session_limit = asyncio.Semaphore(50)

def register(self, config: InboundTransportConfiguration) -> str:
"""
Register transport module.
Expand Down Expand Up @@ -163,8 +159,6 @@ async def create_session(
client_info: An optional dict describing the client
wire_format: Override the wire format for this session
"""
if self.session_limit:
await self.session_limit
if not wire_format:
wire_format = self.profile.context.inject(BaseWireFormat)
session = InboundSession(
Expand Down Expand Up @@ -195,8 +189,6 @@ def closed_session(self, session: InboundSession):
"""
if session.session_id in self.sessions:
del self.sessions[session.session_id]
if self.session_limit:
self.session_limit.release()
if session.response_buffer:
if self.return_inbound:
self.return_inbound(session.profile, session.response_buffer)
Expand Down
1 change: 0 additions & 1 deletion aries_cloudagent/transport/inbound/tests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ async def test_create_session(self):
test_accept = True
test_can_respond = True
test_client_info = {"client": "info"}
mgr.session_limit = asyncio.Semaphore(16)
session = await mgr.create_session(
test_transport,
accept_undelivered=test_accept,
Expand Down

0 comments on commit ea52011

Please sign in to comment.