Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred82santa committed Apr 28, 2016
1 parent 0e61be1 commit b52bc90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions service_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ def __init__(self, rest_service_name='GenericService', spec=None, plugins=None,
self.base_path = base_path
self.loop = loop or get_event_loop()

self.connector = TCPConnector(loop=self.loop, **self.config.get('connector', {}))

@coroutine
def call(self, service_name, payload=None, **kwargs):
self.logger.debug("Calling service_client {0}...".format(service_name))
Expand Down Expand Up @@ -92,7 +90,8 @@ def call(self, service_name, payload=None, **kwargs):

@coroutine
def create_session(self, service_desc, request_params):
session = ClientSession(connector=self.connector, loop=self.loop)
connector = TCPConnector(loop=self.loop, **self.config.get('connector', {}))
session = ClientSession(connector=connector, loop=self.loop)
yield from self._execute_plugin_hooks('prepare_session', service_desc=service_desc, session=session,
request_params=request_params)
return session
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'Development Status :: 4 - Beta'],
packages=['service_client'],
include_package_data=True,
install_requires=['dirty-loader'],
install_requires=['dirty-loader', 'aiohttp'],
description="Service Client Framework powered by Python asyncio.",
long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
test_suite="nose.collector",
Expand Down

0 comments on commit b52bc90

Please sign in to comment.