Don't ban when capacity has been reached (#1326)

This commit is contained in:
Ori Newman 2020-12-30 15:15:41 +02:00 committed by GitHub
parent 739cffd918
commit 6172e48adc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,6 +89,12 @@ func (c *gRPCConnection) receiveLoop() error {
if errors.Is(err, routerpkg.ErrRouteClosed) {
return nil
}
// ErrRouteCapacityReached isn't an invalid message error, so
// we return it in order to log it later on.
if errors.Is(err, routerpkg.ErrRouteCapacityReached) {
return err
}
if c.onInvalidMessageHandler != nil {
c.onInvalidMessageHandler(err)
}