Enforce dgram max response size limit. (#398)

This commit is contained in:
Ximon Eighteen
2024-10-02 20:57:18 +02:00
committed by GitHub
parent 5b50a22b24
commit 279fc79f1c
+1 -1
View File
@@ -118,7 +118,7 @@ impl Config {
/// [RFC 6891]:
/// https://datatracker.ietf.org/doc/html/rfc6891#section-6.2.5
pub fn set_max_response_size(&mut self, value: Option<u16>) {
self.max_response_size = value;
self.max_response_size = value.map(|v| MAX_RESPONSE_SIZE.limit(v));
}
/// Sets the time to wait for a complete message to be written to the