Chromium Code Reviews| Index: scripts/master/deferred_resource.py |
| diff --git a/scripts/master/deferred_resource.py b/scripts/master/deferred_resource.py |
| index 0f613f1ec2c8c0d627bc4f68a122bdfe60c8be9a..c7d6b27d24e940749ee1b8993ea16b591fb4c08f 100644 |
| --- a/scripts/master/deferred_resource.py |
| +++ b/scripts/master/deferred_resource.py |
| @@ -161,7 +161,7 @@ class DeferredResource(object): |
| self.api = self.Api(self) |
| self._th_local = threading.local() |
| self.started = False |
| - self.timeout = timeout |
| + self._resource._http.timeout = timeout |
| @classmethod |
| def _create_thread_pool(cls, max_concurrent_requests): |
| @@ -335,7 +335,7 @@ class DeferredResource(object): |
| if create_creds: |
| self._th_local.credentials = None |
| self._th_local.credentials_expiry = None |
| - self._th_local.http = httplib2.Http(timeout=self.timeout) |
| + self._th_local.http = self._resource._http |
|
nodir
2016/08/17 07:01:52
That doesn't look thread-safe anymore
dsansome
2016/08/17 08:55:41
Ah so *that's* why it's done this way. I've chang
nodir
2016/08/17 21:07:29
Yes, th_local is threading.Local
|
| if self.credentials is not None: |
| creds = self.credentials |
| ttl = None |