fix some network.get_transaction calls
see #4814 (issuecomment-434392195)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user