Browse Source
interface: if request times out, no need to dump trace
3.3.3.1
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
6 additions and
3 deletions
-
electrum/interface.py
|
|
@ -72,9 +72,12 @@ class NotificationSession(ClientSession): |
|
|
|
timeout = 20 if not self.proxy else 30 |
|
|
|
# note: the semaphore implementation guarantees no starvation |
|
|
|
async with self.in_flight_requests_semaphore: |
|
|
|
return await asyncio.wait_for( |
|
|
|
super().send_request(*args, **kwargs), |
|
|
|
timeout) |
|
|
|
try: |
|
|
|
return await asyncio.wait_for( |
|
|
|
super().send_request(*args, **kwargs), |
|
|
|
timeout) |
|
|
|
except asyncio.TimeoutError as e: |
|
|
|
raise GracefulDisconnect('request timed out: {}'.format(args)) from e |
|
|
|
|
|
|
|
async def subscribe(self, method, params, queue): |
|
|
|
# note: until the cache is written for the first time, |
|
|
|