Drop waits to half-seconds

ems_to_bidir_streaming
Tyler Goodlet 2021-06-01 10:37:36 -04:00
parent 9931accc52
commit edf3af9777
1 changed files with 3 additions and 3 deletions

View File

@ -64,13 +64,13 @@ class NoBsWs:
async def _connect( async def _connect(
self, self,
tries: int = 10000, tries: int = 1000,
) -> None: ) -> None:
while True: while True:
try: try:
await self._stack.aclose() await self._stack.aclose()
except (DisconnectionTimeout, RuntimeError): except (DisconnectionTimeout, RuntimeError):
await trio.sleep(1) await trio.sleep(0.5)
else: else:
break break
@ -95,7 +95,7 @@ class NoBsWs:
f'{self} connection bail with ' f'{self} connection bail with '
f'{type(err)}...retry attempt {i}' f'{type(err)}...retry attempt {i}'
) )
await trio.sleep(1) await trio.sleep(0.5)
continue continue
else: else:
log.exception('ws connection fail...') log.exception('ws connection fail...')