Use non-deprecated method of acquiring lock

This commit is contained in:
Toby Harradine 2019-02-05 09:37:28 +11:00 committed by Rapptz
parent 5fa54d196e
commit 8586251089

View File

@ -148,7 +148,7 @@ class HTTPClient:
# wait until the global lock is complete
await self._global_over.wait()
await lock
await lock.acquire()
with MaybeUnlock(lock) as maybe_lock:
for tries in range(5):
async with self._session.request(method, url, **kwargs) as r: