Skip to content

Commit

Permalink
repair urllib3 can't set timeout! (SeleniumHQ#6286)
Browse files Browse the repository at this point in the history
cls._timeout should be  transfer to request when init urllib3.PoolManager
  • Loading branch information
DevineLiu authored and Grigory Mischenko committed Sep 20, 2018
1 parent 2ddb978 commit 26e4d57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py/selenium/webdriver/remote/remote_connection.py
Expand Up @@ -137,7 +137,7 @@ def __init__(self, remote_server_addr, keep_alive=False, resolve_ip=True):

self._url = remote_server_addr
if keep_alive:
self._conn = urllib3.PoolManager()
self._conn = urllib3.PoolManager(timeout=self._timeout)

self._commands = {
Command.STATUS: ('GET', '/status'),
Expand Down Expand Up @@ -398,7 +398,7 @@ def _request(self, method, url, body=None):

statuscode = resp.status
else:
http = urllib3.PoolManager()
http = urllib3.PoolManager(timeout=self._timeout)
resp = http.request(method, url, body=body, headers=headers)

statuscode = resp.status
Expand Down

0 comments on commit 26e4d57

Please sign in to comment.