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

automatically set machine state to error upon disconnect of writer #1054

Open
wants to merge 1 commit into
base: master
from

Conversation

@tschulte
Copy link

commented Mar 6, 2019

Most of the implementations of the run method of the ThreadedStenotypeBase
do not catch exceptions. This causes the thread to silently die (the
exception is only logged to the console).

Now an exception in the run method is reported as an error to the system
and additionally the SerialStenotypeBase class does close the com port on
error.

Otherwise the com port resource might still be taken by plover upon
reconnect of the writer, and a different com port might be taken by the OS
and plover might not be able to reconnect to that machine.

This is a first part to solving issue #596. In addition there must be some
mechanism to retry connecting when the state is error.

automatically set machine state to error upon disconnect of writer
Most of the implementations of the run method of the ThreadedStenotypeBase
do not catch exceptions. This causes the thread to silently die (the
exception is only logged to the console).

Now an exception in the run method is reported as an error to the system
and additionally the SerialStenotypeBase class does close the com port on
error.

Otherwise the com port resource might still be taken by plover upon
reconnect of the writer, and a different com port might be taken by the OS
and plover might not be able to reconnect to that machine.

This is a first part to solving issue #596. In addition there must be some
mechanism to retry connecting when the state is error.
@tschulte

This comment has been minimized.

Copy link
Author

commented Mar 13, 2019

I now created a (plugin https://github.com/tschulte/plover_auto_reconnect_machine) that does the reconnect. But that plugin relies on this pull request to be applied.

@benoit-pierre benoit-pierre added this to the post 4.0.0 milestone Apr 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.