mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
server: don't die on startup when persistent peer already connected
This commit is contained in:
parent
ce813276d5
commit
7133043ff7
1 changed files with 4 additions and 1 deletions
|
@ -52,6 +52,7 @@ import (
|
||||||
"github.com/lightningnetwork/lnd/lnpeer"
|
"github.com/lightningnetwork/lnd/lnpeer"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc"
|
"github.com/lightningnetwork/lnd/lnrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||||
|
"github.com/lightningnetwork/lnd/lnutils"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet"
|
"github.com/lightningnetwork/lnd/lnwallet"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
|
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
|
||||||
|
@ -2139,7 +2140,9 @@ func (s *server) Start() error {
|
||||||
peerAddr, true,
|
peerAddr, true,
|
||||||
s.cfg.ConnectionTimeout,
|
s.cfg.ConnectionTimeout,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil &&
|
||||||
|
!lnutils.ErrorAs[*errPeerAlreadyConnected](err) {
|
||||||
|
|
||||||
startErr = fmt.Errorf("unable to connect to "+
|
startErr = fmt.Errorf("unable to connect to "+
|
||||||
"peer address provided as a config "+
|
"peer address provided as a config "+
|
||||||
"option: %v", err)
|
"option: %v", err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue