Skip to content

lndclient: silence expected close error on shutdown#262

Merged
starius merged 1 commit intolightninglabs:masterfrom
starius:silence-close-err
Jan 23, 2026
Merged

lndclient: silence expected close error on shutdown#262
starius merged 1 commit intolightninglabs:masterfrom
starius:silence-close-err

Conversation

@starius
Copy link
Contributor

@starius starius commented Jan 22, 2026

During planned termination, conn.Close() can return ErrClientConnClosing from gRPC package. This is expected and should not be logged as an error. Downgrade that case to debug so logs stay clean during shutdown.

Original log line:

[ERR] LNDC: Error closing lnd connection: rpc error: code = Canceled desc = grpc: the client connection is closing

Pull Request Checklist

  • PR is opened against correct version branch.
  • Version compatibility matrix in the README and minimal required version
    in lnd_services.go are updated.
  • Update macaroon_recipes.go if your PR adds a new method that is called
    differently than the RPC method it invokes.

@starius starius requested review from hieblmi and ziggie1984 January 22, 2026 18:27
Copy link

@ziggie1984 ziggie1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

During planned termination, conn.Close() can return ErrClientConnClosing from
gRPC package. This is expected and should not be logged as an error. Downgrade
that case to debug so logs stay clean during shutdown.

Original log line:
[ERR] LNDC: Error closing lnd connection: rpc error: code = Canceled
desc = grpc: the client connection is closing
@starius starius merged commit 3b797f4 into lightninglabs:master Jan 23, 2026
1 check passed
@starius starius deleted the silence-close-err branch January 23, 2026 15:41
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.

3 participants