mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
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:
8
lnpeer/errors.go
Normal file
8
lnpeer/errors.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package lnpeer
|
||||
|
||||
import "fmt"
|
||||
|
||||
var (
|
||||
// ErrPeerExiting signals that the peer received a disconnect request.
|
||||
ErrPeerExiting = fmt.Errorf("peer exiting")
|
||||
)
|
||||
Reference in New Issue
Block a user