lnpeer+peer: use importable lnpeer.ErrPeerExiting

As a prepatory step to making gossip replies synchronous, we will move
the ErrPeerExiting error into the lnpeer package so that it can be
imported by the discovery package. With synchronous sends, this error
can now be detected and handled by goroutines in the syncer, and cause
them to exit instead of continue to sending backlogs.
This commit is contained in:
Conner Fromknecht
2019-04-26 17:31:27 -07:00
parent 23d10336c2
commit ca358e9673
2 changed files with 14 additions and 9 deletions

8
lnpeer/errors.go Normal file
View File

@@ -0,0 +1,8 @@
package lnpeer
import "fmt"
var (
// ErrPeerExiting signals that the peer received a disconnect request.
ErrPeerExiting = fmt.Errorf("peer exiting")
)