Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore error when closing an already closed serial connection #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clssn
Copy link
Owner

@clssn clssn commented Apr 22, 2024

An OSError would be raised when reader and writer threads were concurrently closing the serial connection. One of them would close an already closed connection.

Ideally this would be synchronized so we'd be able to detect an issue closing the connection. In this case a global resource in the system may be broken rendering the system un-usable.

For now we just ignore any issues while closing, not taking a potential later use of the device into account.

An OSError would be raised when reader and writer threads were
concurrently closing the serial connection. One of them would close
an already closed connection.

Ideally this would be synchronized so we'd be able to detect an issue
closing the connection. In this case a global resource in the system may
be broken rendering the system un-usable.

For now we just ignore any issues while closing, not taking a potential
later use of the device into account.
Need evidence that this exact code is executed.
@clssn clssn force-pushed the bugfix/fail-on-concurrent-serial-close branch from 886e0fe to bcb633d Compare April 23, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant