Skip to content

Commit

Permalink
use low-res timer for connection timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Kim committed Feb 9, 2017
1 parent 3351949 commit 0126685
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,8 @@ def connect(self, req):
placeholder = _TransportPlaceholder()
self._acquired.add(placeholder)
try:
if self._conn_timeout:
transport, proto = yield from asyncio.wait_for(
self._create_connection(req),
self._conn_timeout, loop=self._loop)
else:
with self._time_service.timeout(self._conn_timeout):
transport, proto = yield from self._create_connection(req)

except asyncio.TimeoutError as exc:
raise ClientTimeoutError(
'Connection timeout to host {0[0]}:{0[1]} ssl:{0[2]}'
Expand Down

0 comments on commit 0126685

Please sign in to comment.