Skip to content

Commit e6a4840

Browse files
committed
support.endpoint: treat -EPIPE as disconnection.
1 parent ba09c73 commit e6a4840

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

software/glasgow/support/endpoint.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ def _check_future(self):
140140
async def _refill(self):
141141
self._future = future = asyncio.Future()
142142
self._check_future()
143-
self._buffer = await future
143+
try:
144+
self._buffer = await future
145+
except BrokenPipeError:
146+
self._buffer = None
144147
if self._buffer is None:
145148
self._buffer = b""
146149
self._log(logging.TRACE, "recv end-of-stream")

0 commit comments

Comments
 (0)