Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce default max bucket size and warn on payload too large #4098

Merged

Conversation

asdacap
Copy link
Contributor

@asdacap asdacap commented Jun 2, 2022

Resolves #3974

Changes:

Types of changes

  • [X ] Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

  • Confirmed warning shows up if bucket size is 16.
  • Did not found other warning so far when bucket size is set to 12.

@@ -92,6 +92,11 @@ public async void SendMsg(DiscoveryMsg discoveryMsg)
return;
}

if (msgBytes.Length > 1280)
{
_logger.Warn($"Attempting to send message larger than 1280 bytes. This is out of spec and may not work for all client. Msg: ${discoveryMsg}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add if(_logger.Warn) guard. Convention to not create those strings if not needed.

@LukaszRozmej LukaszRozmej merged commit 1a740a2 into master Jun 3, 2022
@LukaszRozmej LukaszRozmej deleted the fix/reduce-default-max-neighbour-and-warn-on-large-packet branch June 3, 2022 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UDP payloads too big?
2 participants