peer: return from pingHandler if error
This commit adds a missing return statement to pingHandler. This prevents a nil pointer dereference panic from happening if an error is returned from RegisterBlockEpochNtfn.
This commit is contained in:
1 file changed
+1
@@ -2016,6 +2016,7 @@ func (p *Brontide) pingHandler() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
peerLog.Errorf("unable to establish block epoch "+
|
peerLog.Errorf("unable to establish block epoch "+
|
||||||
"subscription: %v", err)
|
"subscription: %v", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
Reference in new issue
Block a user