Skip to content

Commit 76f6425

Browse files
committed
Update example to keep up with latest Trio release
1 parent 87442eb commit 76f6425

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/trio-server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async def shutdown_and_clean_up(self):
149149
#
150150
try:
151151
await self.stream.send_eof()
152-
except trio.BrokenStreamError:
152+
except trio.BrokenResourceError:
153153
# They're already gone, nothing to do
154154
return
155155
# Wait and read for a bit to give them a chance to see that we closed
@@ -168,7 +168,7 @@ async def shutdown_and_clean_up(self):
168168
got = await self.stream.receive_some(MAX_RECV)
169169
if not got:
170170
break
171-
except trio.BrokenStreamError:
171+
except trio.BrokenResourceError:
172172
pass
173173
finally:
174174
await self.stream.aclose()

0 commit comments

Comments
 (0)