Skip to content

[LLT-6785] Report DaemonIsNotRunning instead of raw IO errors - #1961

Open
olekoliinyk wants to merge 1 commit into
mainfrom
LLT-6785_report_daemon_is_not_running
Open

[LLT-6785] Report DaemonIsNotRunning instead of raw IO errors#1961
olekoliinyk wants to merge 1 commit into
mainfrom
LLT-6785_report_daemon_is_not_running

Conversation

@olekoliinyk

@olekoliinyk olekoliinyk commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

nordvpnlite is-alive issued right after nordvpnlite stop fails with a raw OS error instead of DaemonIsNotRunning:
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 DaemonIsNotRunning only 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

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

@olekoliinyk
olekoliinyk requested a review from a team as a code owner August 21, 2026 09:52
@olekoliinyk olekoliinyk changed the title nordvpnlite: Report DaemonIsNotRunning instead of raw IO errors when … [LLT-6785] Report DaemonIsNotRunning instead of raw IO errors Aug 21, 2026
@olekoliinyk
olekoliinyk force-pushed the LLT-6785_report_daemon_is_not_running branch from ffd9ead to e0053bb Compare August 21, 2026 13:29
@olekoliinyk
olekoliinyk force-pushed the LLT-6785_report_daemon_is_not_running branch from e0053bb to 676246c Compare August 26, 2026 10:38
@olekoliinyk
olekoliinyk force-pushed the LLT-6785_report_daemon_is_not_running branch from 676246c to 80d80ac Compare August 26, 2026 10:45
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.

1 participant