lightning-disconnect \- Command for disconnecting from another lightning node\&.
.SH"SYNOPSIS"
.sp
\fBdisconnect\fR\fIid\fR
\fBdisconnect\fR\fIid\fR [\fIforce\fR]
.SH"DESCRIPTION"
.sp
The disconnect RPC command closes an existing connection to a peer, identified by \fIid\fR, in the Lightning Network, as long as it doesn\(cqt have an active channel\&.
The disconnect RPC command closes an existing connection to a peer, identified by \fIid\fR, in the Lightning Network, as long as it doesn\(cqt have an active channel\&. If \fIforce\fR is set then it will disconnect even with an active channel\&.
.sp
The \fIid\fR can be discovered in the output of the listpeers command, which returns a set of peers:
.sp
@ -56,7 +56,7 @@ The \fIid\fR can be discovered in the output of the listpeers command, which ret
.RE
.\}
.sp
Passing the \fIid\fR attribute of a peer to lightning\-disconnect will terminate the connection\&.
Passing the \fIid\fR attribute of a peer to \fIdisconnect\fR will terminate the connection\&.
.SH"RETURN VALUE"
.sp
On success, an empty object is returned\&.
@ -73,6 +73,18 @@ If \fIid\fR is invalid, an error message will be returned:
.ifn\{\
.RE
.\}
.sp
If the peer has an active channel and \fIforce\fR is not set, an error message will be returned:
.sp
.ifn\{\
.RS4
.\}
.nf
{ "code" : \-1, "message" : "Peer is in state CHANNELD_NORMAL" }
.fi
.ifn\{\
.RE
.\}
.SH"AUTHOR"
.sp
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.