diff --git a/lora.py b/lora.py index c4f1baf..9dca579 100644 --- a/lora.py +++ b/lora.py @@ -77,7 +77,7 @@ class LORANode(object): origstate = self.st.copy() while True: - resp = await self.sd.sendtillrecv(msg, 1) + resp = await self.sd.sendtillrecv(msg, .25) #_debprint('got:', resp) # skip empty messages @@ -133,7 +133,7 @@ class SyncDatagram(object): async def recv(self, timeout=None): #pragma: no cover '''Receive a datagram. If timeout is not None, wait that many seconds, and if nothing is received in that time, raise an - TimeoutError exception.''' + asyncio.TimeoutError exception.''' raise NotImplementedError @@ -151,7 +151,7 @@ class SyncDatagram(object): await self.send(data) try: return await self.recv(freq) - except TimeoutError: + except asyncio.TimeoutError: pass class MulticastSyncDatagram(SyncDatagram): @@ -340,7 +340,7 @@ class TestSyncData(unittest.IsolatedAsyncioTestCase): class MySync(SyncDatagram): def __init__(self): self.sendq = [] - self.resp = [ TimeoutError(), b'a' ] + self.resp = [ asyncio.TimeoutError(), b'a' ] async def recv(self, timeout=None): assert timeout == 1