mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
c3254e6639
mrkd started enforcing the `name -- short description` style of top-level headings somewhere, and was thus failing to build the man-pages. I swapped the title and with the existing short description to make it work again. `mrkd` will automatically infer the section from the filename so no need to put it in the title as well. In addition I removed the "last updated" lines at the bottom since they are out of date at best, and misleading at the worst. If we want to keep them, I'd suggest generating them from the commit that last touched them.
79 lines
1.4 KiB
Groff
79 lines
1.4 KiB
Groff
.TH "LIGHTNING-DISCONNECT" "7" "" "" "lightning-disconnect"
|
||
.SH NAME
|
||
lightning-disconnect - Command for disconnecting from another lightning node
|
||
.SH SYNOPSIS
|
||
|
||
\fBdisconnect\fR \fIid\fR [\fIforce\fR]
|
||
|
||
.SH DESCRIPTION
|
||
|
||
The disconnect RPC command closes an existing connection to a peer,
|
||
identified by \fIid\fR, in the Lightning Network, as long as it doesn’t have
|
||
an active channel\. If \fIforce\fR is set then it will disconnect even with
|
||
an active channel\.
|
||
|
||
|
||
The \fIid\fR can be discovered in the output of the listpeers command, which
|
||
returns a set of peers:
|
||
|
||
.nf
|
||
.RS
|
||
{
|
||
"peers": [
|
||
{
|
||
"id": "0563aea81...",
|
||
"connected": true,
|
||
...
|
||
}
|
||
]
|
||
}
|
||
|
||
|
||
.RE
|
||
|
||
.fi
|
||
|
||
Passing the \fIid\fR attribute of a peer to \fIdisconnect\fR will terminate the
|
||
connection\.
|
||
|
||
.SH RETURN VALUE
|
||
|
||
On success, an empty object is returned\.
|
||
|
||
.SH ERRORS
|
||
|
||
If \fIid\fR is invalid, an error message will be returned:
|
||
|
||
.nf
|
||
.RS
|
||
{ "code" : -1, "message" : "Peer not connected" }
|
||
|
||
|
||
.RE
|
||
|
||
.fi
|
||
|
||
If the peer has an active channel and \fIforce\fR is not set, an error
|
||
message will be returned:
|
||
|
||
.nf
|
||
.RS
|
||
{ "code" : -1, "message" : "Peer is in state CHANNELD_NORMAL" }
|
||
|
||
|
||
.RE
|
||
|
||
.fi
|
||
.SH AUTHOR
|
||
|
||
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
|
||
|
||
.SH SEE ALSO
|
||
|
||
\fBlightning-connect\fR(1), \fBlightning-listpeers\fR(1)
|
||
|
||
.SH RESOURCES
|
||
|
||
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
||
|