[LLT-6785] Report DaemonIsNotRunning instead of raw IO errors - #1961
Open
olekoliinyk wants to merge 1 commit into
Open
[LLT-6785] Report DaemonIsNotRunning instead of raw IO errors#1961olekoliinyk wants to merge 1 commit into
olekoliinyk wants to merge 1 commit into
Conversation
olekoliinyk
force-pushed
the
LLT-6785_report_daemon_is_not_running
branch
from
August 21, 2026 13:29
ffd9ead to
e0053bb
Compare
olekoliinyk
force-pushed
the
LLT-6785_report_daemon_is_not_running
branch
from
August 26, 2026 10:38
e0053bb to
676246c
Compare
…the daemon is gone
olekoliinyk
force-pushed
the
LLT-6785_report_daemon_is_not_running
branch
from
August 26, 2026 10:45
676246c to
80d80ac
Compare
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.
Problem
nordvpnlite is-aliveissued right afternordvpnlite stopfails with a raw OS error instead ofDaemonIsNotRunning:Error: Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" })Before sending a command, the CLI only checks that the daemon's socket file exists, and it reports
DaemonIsNotRunningonly when that check fails.The daemon answers stop before it exits and removes the socket file, so a command landing in that window passes the check, connects, gets reset, and the IO error is propagated as-is.
Solution
Report IO errors that mean nothing is listening (refused, reset, aborted, broken pipe, EOF, not found) as
DaemonIsNotRunning, same as a missing socket file.In nat-lab: drop the sleep, return False from is_alive() instead of re-raising. Without the sleep, quit() and kill() now poll for the process to exit and the socket to disappear.
☑️ Definition of Done checklist