We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1aac39b commit cc71e5dCopy full SHA for cc71e5d
relay-server/src/utils/sizes.rs
@@ -90,7 +90,7 @@ pub fn check_envelope_size_limits(
90
// For item containers, we want to check that the contained items obey
91
// the size limits *on average*.
92
// For standalone items, this is just the item size itself.
93
- let avg_item_size = item.len() / (item.item_count().unwrap_or(1) as usize);
+ let avg_item_size = item.len() / (item.item_count().unwrap_or(1).max(1) as usize);
94
if avg_item_size > max_size {
95
return Err(item
96
.attachment_type()
0 commit comments