Browse Source

Update disconnect manpage

pr-2587
andrewtoth 6 years ago
committed by Christian Decker
parent
commit
90f9985dd2
  1. 22
      doc/lightning-disconnect.7
  2. 10
      doc/lightning-disconnect.7.txt

22
doc/lightning-disconnect.7

@ -2,12 +2,12 @@
.\" Title: lightning-disconnect
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/04/2018
.\" Date: 04/03/2019
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "LIGHTNING\-DISCONNEC" "7" "12/04/2018" "\ \&" "\ \&"
.TH "LIGHTNING\-DISCONNEC" "7" "04/03/2019" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -31,10 +31,10 @@
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:
.if n \{\
.RE
.\}
.sp
If the peer has an active channel and \fIforce\fR is not set, an error message will be returned:
.sp
.if n \{\
.RS 4
.\}
.nf
{ "code" : \-1, "message" : "Peer is in state CHANNELD_NORMAL" }
.fi
.if n \{\
.RE
.\}
.SH "AUTHOR"
.sp
Michael Hawkins <michael\&.hawkins@protonmail\&.com>\&.

10
doc/lightning-disconnect.7.txt

@ -8,13 +8,14 @@ lightning-disconnect - Command for disconnecting from another lightning node.
SYNOPSIS
--------
*disconnect* 'id'
*disconnect* 'id' ['force']
DESCRIPTION
-----------
The disconnect RPC command closes an existing connection to a
peer, identified by 'id', in the Lightning Network, as long as it
doesn't have an active channel.
doesn't have an active channel. If 'force' is set then it will disconnect
even with an active channel.
The 'id' can be discovered in the output of the listpeers
command, which returns a set of peers:
@ -42,6 +43,11 @@ If 'id' is invalid, an error message will be returned:
{ "code" : -1, "message" : "Peer not connected" }
If the peer has an active channel and 'force' is not set, an error message
will be returned:
{ "code" : -1, "message" : "Peer is in state CHANNELD_NORMAL" }
AUTHOR
------
Michael Hawkins <michael.hawkins@protonmail.com>.

Loading…
Cancel
Save