commit 4731544cdfae2e6b1a49faaa8b4b1c6a8b918bd3
parent d102cebe8039786d4ef28599a97db1e5d5b1d51f
Author: William Casarin <jb55@jb55.com>
Date: Tue, 15 Mar 2022 14:50:25 -0700
lnsocket.go: add disconnect function
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/lnsocket.go b/lnsocket.go
@@ -176,6 +176,10 @@ func (ln *LNSocket) rpcReadAll() (string, error) {
}
}
+func (ln *LNSocket) Disconnect() {
+ ln.Conn.Close()
+}
+
func (ln *LNSocket) ConnectAndInit(hostname string, pubkey string) error {
err := ln.Connect(hostname, pubkey)
if err != nil {