From b85bab1a09bf9943b2ea9040387ce59b7b6c8528 Mon Sep 17 00:00:00 2001 From: mhchia Date: Sun, 26 Jan 2020 23:09:56 +0800 Subject: [PATCH] Don't catch `trio.BusyResourceError` --- libp2p/io/trio.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libp2p/io/trio.py b/libp2p/io/trio.py index b8571c8..465e4ea 100644 --- a/libp2p/io/trio.py +++ b/libp2p/io/trio.py @@ -35,12 +35,6 @@ class TrioTCPStream(ReadWriteCloser): return await self.stream.receive_some(n) except (trio.ClosedResourceError, trio.BrokenResourceError) as error: raise IOException from error - except trio.BusyResourceError as error: - # This should never happen, since we already access streams with read/write locks. - raise Exception( - "this should never happen " - "since we already access streams with read/write locks." - ) from error async def close(self) -> None: await self.stream.aclose()