1
0

fix some network.get_transaction calls

see #4814 (issuecomment-434392195)
This commit is contained in:
SomberNight
2018-10-30 19:07:37 +01:00
parent f53b480f1c
commit 5b4fada2a0
5 changed files with 26 additions and 24 deletions

View File

@@ -68,9 +68,9 @@ class NotificationSession(RPCSession):
else:
raise Exception('unexpected request: {}'.format(repr(request)))
async def send_request(self, *args, timeout=-1, **kwargs):
async def send_request(self, *args, timeout=None, **kwargs):
# note: the timeout starts after the request touches the wire!
if timeout == -1:
if timeout is None:
timeout = 30
# note: the semaphore implementation guarantees no starvation
async with self.in_flight_requests_semaphore:
@@ -108,7 +108,13 @@ class NotificationSession(RPCSession):
class GracefulDisconnect(Exception): pass
class RequestTimedOut(GracefulDisconnect): pass
class RequestTimedOut(GracefulDisconnect):
def __str__(self):
return _("Network request timed out.")
class ErrorParsingSSLCert(Exception): pass
class ErrorGettingSSLCertFromServer(Exception): pass