forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
23d1033
commit ca358e9
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package lnpeer | ||
|
||
import "fmt" | ||
|
||
var ( | ||
// ErrPeerExiting signals that the peer received a disconnect request. | ||
ErrPeerExiting = fmt.Errorf("peer exiting") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters