Skip to content

Commit

Permalink
Merge 33c08da into a1bcb88
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Apr 5, 2023
2 parents a1bcb88 + 33c08da commit 8edadf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bellows/uart.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _reset_cleanup(self, future):

def eof_received(self):
"""Server gracefully closed its side of the connection."""
self.connection_lost(OSError("Server closed connection"))
self.connection_lost(ConnectionResetError("Remote server closed connection"))

def connection_lost(self, exc):
"""Port was closed unexpectedly."""
Expand All @@ -214,7 +214,7 @@ def connection_lost(self, exc):
# `CancelledError` into the active event loop, breaking everything!
if self._startup_reset_future:
self._startup_reset_future.set_exception(
exc or OSError("Server closed connection")
exc or ConnectionResetError("Remote server closed connection")
)

if self._connection_done_future:
Expand Down

0 comments on commit 8edadf0

Please sign in to comment.