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:
Elle Mouton 2021-09-14 22:09:10 +02:00
parent fb06c14c22
commit 171d047972
No known key found for this signature in database
GPG Key ID: D7D916376026F177

View File

@ -2016,6 +2016,7 @@ func (p *Brontide) pingHandler() {
if err != nil {
peerLog.Errorf("unable to establish block epoch "+
"subscription: %v", err)
return
}
var (