mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-11 05:20:05 +00:00
parent
5b42a6e8e8
commit
359ae889b8
@ -630,8 +630,14 @@ func makeInboundMessage() *proto_sentry.InboundMessage {
|
|||||||
return new(proto_sentry.InboundMessage)
|
return new(proto_sentry.InboundMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cs *MultiClient) HandleInboundMessage(ctx context.Context, message *proto_sentry.InboundMessage, sentry direct.SentryClient) error {
|
func (cs *MultiClient) HandleInboundMessage(ctx context.Context, message *proto_sentry.InboundMessage, sentry direct.SentryClient) (err error) {
|
||||||
err := cs.handleInboundMessage(ctx, message, sentry)
|
defer func() {
|
||||||
|
if rec := recover(); rec != nil {
|
||||||
|
err = fmt.Errorf("%+v, msgID=%s, trace: %s", rec, message.Id.String(), dbg.Stack())
|
||||||
|
}
|
||||||
|
}() // avoid crash because Erigon's core does many things
|
||||||
|
|
||||||
|
err = cs.handleInboundMessage(ctx, message, sentry)
|
||||||
|
|
||||||
if (err != nil) && rlp.IsInvalidRLPError(err) {
|
if (err != nil) && rlp.IsInvalidRLPError(err) {
|
||||||
log.Debug("Kick peer for invalid RLP", "err", err)
|
log.Debug("Kick peer for invalid RLP", "err", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user