Don't bother unsetting the squeue; let errors propogate up
parent
0ac564dbf3
commit
aa259433f5
piker
|
@ -86,7 +86,6 @@ class Channel:
|
||||||
self._destaddr = destaddr or self.squeue.raddr
|
self._destaddr = destaddr or self.squeue.raddr
|
||||||
# set after handshake - always uid of far end
|
# set after handshake - always uid of far end
|
||||||
self.uid = None
|
self.uid = None
|
||||||
self.event = None
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
if self.squeue:
|
if self.squeue:
|
||||||
|
@ -122,12 +121,10 @@ class Channel:
|
||||||
if self._autorecon:
|
if self._autorecon:
|
||||||
await self._reconnect()
|
await self._reconnect()
|
||||||
return await self.recv()
|
return await self.recv()
|
||||||
self.squeue = None
|
|
||||||
|
|
||||||
async def aclose(self, *args):
|
async def aclose(self, *args):
|
||||||
log.debug(f"Closing {self}")
|
log.debug(f"Closing {self}")
|
||||||
await self.squeue.stream.aclose()
|
await self.squeue.stream.aclose()
|
||||||
self.squeue = None
|
|
||||||
|
|
||||||
async def __aenter__(self):
|
async def __aenter__(self):
|
||||||
await self.connect()
|
await self.connect()
|
||||||
|
@ -184,7 +181,6 @@ class Channel:
|
||||||
if not self._autorecon:
|
if not self._autorecon:
|
||||||
raise
|
raise
|
||||||
await self.aclose()
|
await self.aclose()
|
||||||
self.squeue = None
|
|
||||||
if self._autorecon: # attempt reconnect
|
if self._autorecon: # attempt reconnect
|
||||||
await self._reconnect()
|
await self._reconnect()
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue