Skip to content

cmd/incus-user: refactor to not use os.Exit and instead close listener#2690

Merged
stgraber merged 1 commit intolxc:mainfrom
RageZBla:chore-golangci-lint-incus-user
Nov 25, 2025
Merged

cmd/incus-user: refactor to not use os.Exit and instead close listener#2690
stgraber merged 1 commit intolxc:mainfrom
RageZBla:chore-golangci-lint-incus-user

Conversation

@RageZBla
Copy link
Copy Markdown
Contributor

In order to test did the following:

systemd-socket-activate -l /run/incus-user.sock $PWD/incus-user -d -v 2>&1

in separate terminal connect and disconnect to the socket:

nc -U /run/my_app.sock

Wait and obtained following shutdown log:

INFO   [2025-11-24T12:33:45+09:00] Starting up the server
INFO   [2025-11-24T12:34:20+09:00] Daemon has been inactive, shutting down

In order to test did the following:

`systemd-socket-activate -l /run/incus-user.sock $PWD/incus-user -d -v 2>&1`

in separate terminal connect and disconnect to the socket:

`nc -U /run/my_app.sock`

Wait and obtained following shutdown log:

```
INFO   [2025-11-24T12:33:45+09:00] Starting up the server
INFO   [2025-11-24T12:34:20+09:00] Daemon has been inactive, shutting down
```

Signed-off-by: Olivier Lechevalier <[email protected]>
@RageZBla RageZBla requested a review from stgraber as a code owner November 24, 2025 03:41
@stgraber stgraber merged commit 87aaf55 into lxc:main Nov 25, 2025
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants