Skip to content

Commit

Permalink
Remember to remove serial writer. (#2209)
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Jun 18, 2024
1 parent 8b28323 commit b51806d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pymodbus/transport/serialtransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def close(self, exc: Exception | None = None) -> None:
self.poll_task = None
else:
self.async_loop.remove_reader(self.sync_serial.fileno())
self.async_loop.remove_writer(self.sync_serial.fileno())
self.sync_serial.close()
self.sync_serial = None # type: ignore[assignment]
if exc:
Expand Down

0 comments on commit b51806d

Please sign in to comment.