From 935c757102f27a86df571b1ecef1f20de0ff588e Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Thu, 22 Feb 2018 14:28:48 -0800 Subject: [PATCH] rpcserver: allow unsafe-disconects --- rpcserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index 663cad8b..20c55ad1 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -650,7 +650,7 @@ func (r *rpcServer) DisconnectPeer(ctx context.Context, // In order to avoid erroneously disconnecting from a peer that we have // an active channel with, if we have any channels active with this // peer, then we'll disallow disconnecting from them. - if len(nodeChannels) > 0 { + if len(nodeChannels) > 0 && !cfg.UnsafeDisconnect { return nil, fmt.Errorf("cannot disconnect from peer(%x), "+ "all active channels with the peer need to be closed "+ "first", pubKeyBytes)