mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 14:44:22 +01:00
lncli: cancel RPC context on OS interrupts
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||
@@ -51,6 +50,7 @@ var updateChanStatusCommand = cli.Command{
|
||||
}
|
||||
|
||||
func updateChanStatus(ctx *cli.Context) error {
|
||||
ctxc := getContext()
|
||||
conn := getClientConn(ctx, false)
|
||||
defer conn.Close()
|
||||
|
||||
@@ -82,8 +82,7 @@ func updateChanStatus(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
client := routerrpc.NewRouterClient(conn)
|
||||
ctxb := context.Background()
|
||||
resp, err := client.UpdateChanStatus(ctxb, req)
|
||||
resp, err := client.UpdateChanStatus(ctxc, req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user