Closed cdjackson closed 2 years ago
Hello @cdjackson. It took a look at it and yes, shutdown
exits immediately if the isConfigured
flag is not true
. I guess we need to remove the check and let shutdown
do its job.
@cdjackson I created a PR to suggest a solution. Please take a look.
If the ASH handler fails to initialise correctly, then it doesn't get closed when the Ember driver shuts down. A flag was introduced in #1287 to only perform the shutdown after it was configured and this is set at the end of the
initialize
method. If there is a failure in theinitialize
method, then the flag isn't set, and then whenshutdown
is called, theframeHandler
is not closed - leaving the serial port open. In the log we see a continualASH: Reconnect
being loged in theAshFrameHandler
.@TomTravaglino just pinging you here as I recall we had quite some discussion about this. I've not looked at this in detail yet, but I guess that
shutdown
needs to reverseinitialize
- so if the port is open, we should close it, and if there is a handler open, it should be closed...