Raise when the hardware connection fails instead of logging success - #206
Open
mikelangmayr wants to merge 2 commits into
Open
mikelangmayr wants to merge 2 commits into
mikelangmayr wants to merge 2 commits into
Conversation
mikelangmayr
commented
Sep 15, 2026
Contributor
- the drivers report a failed connect by staying disconnected rather than raising, so _connect_hardware returned normally and on_start logged "Daemon started successfully and connected to hardware" on the line right after "Connection error: Connection timed out"
- the same pattern was in all five daemons that connect this way: inficon, adc, lakeshore, atccryo, srsthermal
- _connect_hardware now raises if the controller is not connected afterwards, so the existing except branch logs the failure and the "hardware is not available" warning, and initialize() is no longer called on a dead connection
- this also fixes writes to isconnected, which previously reported success when the hardware was unreachable; they now return the error
- verified with the hardware absent: lasterror reads "Failed to connect to hardware: no connection to :", a write to isconnected returns that error instead of ok, and with a connected controller initialize() still runs
Contributor
|
Looks good, but it includes changes from #207? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.