Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pycyphal/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.27.0"
__version__ = "1.27.1"
8 changes: 7 additions & 1 deletion pycyphal/transport/serial/_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,13 @@ def callback(ts: Timestamp, buf: memoryview, frame: typing.Optional[SerialFrame]
self._serial_port,
)
self._closed = True
self._serial_port.close()
try:
self._serial_port.close()
except Exception:
# close() is not atomic (see __init__), so when SerialTransport.close() runs at the
# same time, the reader thread can try to close an already-closed port. The resulting
# OSError is harmless, so ignore it.
pass

finally:
_logger.debug("%s: Reader thread is exiting. Head aega.", self)
Expand Down
Loading