Drop deprecated trio error
parent
12fa5542b1
commit
71bb87aa3a
|
@ -30,7 +30,7 @@ class StreamQueue:
|
||||||
try:
|
try:
|
||||||
data = await self.stream.receive_some(2**10)
|
data = await self.stream.receive_some(2**10)
|
||||||
log.trace(f"received {data}") # type: ignore
|
log.trace(f"received {data}") # type: ignore
|
||||||
except trio.BrokenStreamError:
|
except trio.BrokenResourceError:
|
||||||
log.error(f"Stream connection {self.raddr} broke")
|
log.error(f"Stream connection {self.raddr} broke")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ class Channel:
|
||||||
assert self.squeue
|
assert self.squeue
|
||||||
try:
|
try:
|
||||||
return await self.squeue.get()
|
return await self.squeue.get()
|
||||||
except trio.BrokenStreamError:
|
except trio.BrokenResourceError:
|
||||||
if self._autorecon:
|
if self._autorecon:
|
||||||
await self._reconnect()
|
await self._reconnect()
|
||||||
return await self.recv()
|
return await self.recv()
|
||||||
|
@ -191,7 +191,7 @@ class Channel:
|
||||||
# # optimization, passing None through all the
|
# # optimization, passing None through all the
|
||||||
# # time is pointless
|
# # time is pointless
|
||||||
# await self.squeue.put(sent)
|
# await self.squeue.put(sent)
|
||||||
except trio.BrokenStreamError:
|
except trio.BrokenResourceError:
|
||||||
if not self._autorecon:
|
if not self._autorecon:
|
||||||
raise
|
raise
|
||||||
await self.aclose()
|
await self.aclose()
|
||||||
|
|
Loading…
Reference in New Issue