2019-08-10 02:12:44 +02:00
|
|
|
|
.TH "LIGHTNING-DISCONNECT" "7" "" "" "lightning-disconnect"
|
|
|
|
|
.SH NAME
|
2019-08-31 14:30:56 +02:00
|
|
|
|
lightning-disconnect - Command for disconnecting from another lightning node
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
|
2019-04-04 04:08:23 +02:00
|
|
|
|
\fBdisconnect\fR \fIid\fR [\fIforce\fR]
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.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:
|
|
|
|
|
|
2018-12-03 06:20:25 +01:00
|
|
|
|
.nf
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.RS
|
2018-12-03 06:20:25 +01:00
|
|
|
|
{
|
|
|
|
|
"peers": [
|
|
|
|
|
{
|
2019-08-10 02:12:44 +02:00
|
|
|
|
"id": "0563aea81...",
|
2018-12-03 06:20:25 +01:00
|
|
|
|
"connected": true,
|
2019-08-10 02:12:44 +02:00
|
|
|
|
...
|
2018-12-03 06:20:25 +01:00
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
|
2018-12-03 06:20:25 +01:00
|
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
|
2018-12-03 06:20:25 +01:00
|
|
|
|
If \fIid\fR is invalid, an error message will be returned:
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
2018-12-03 06:20:25 +01:00
|
|
|
|
.nf
|
2019-08-10 02:12:44 +02:00
|
|
|
|
.RS
|
|
|
|
|
{ "code" : -1, "message" : "Peer not connected" }
|
|
|
|
|
|
|
|
|
|
|
2018-12-03 06:20:25 +01:00
|
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
2019-04-04 04:08:23 +02:00
|
|
|
|
.fi
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
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" }
|
|
|
|
|
|
|
|
|
|
|
2019-04-04 04:08:23 +02:00
|
|
|
|
.RE
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.fi
|
|
|
|
|
.SH AUTHOR
|
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
|
Michael Hawkins \fI<michael.hawkins@protonmail.com\fR>\.
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|
|
|
|
|
.SH SEE ALSO
|
|
|
|
|
|
|
|
|
|
\fBlightning-connect\fR(1), \fBlightning-listpeers\fR(1)
|
|
|
|
|
|
|
|
|
|
.SH RESOURCES
|
|
|
|
|
|
2019-08-31 14:30:56 +02:00
|
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
2019-08-10 02:12:44 +02:00
|
|
|
|
|