mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 15:21:08 +00:00
Add a 16MiB hard limit to Substrate packets (#2009)
This commit is contained in:
committed by
Bastian Köcher
parent
03d52fdbeb
commit
35a67b31e5
@@ -388,7 +388,11 @@ where TSubstream: AsyncRead + AsyncWrite,
|
||||
socket: TSubstream,
|
||||
info: Self::Info,
|
||||
) -> Self::Future {
|
||||
let framed = Framed::new(socket, UviBytes::default());
|
||||
let framed = {
|
||||
let mut codec = UviBytes::default();
|
||||
codec.set_max_len(16 * 1024 * 1024); // 16 MiB hard limit for packets.
|
||||
Framed::new(socket, codec)
|
||||
};
|
||||
|
||||
future::ok(RegisteredProtocolSubstream {
|
||||
is_closing: false,
|
||||
|
||||
Reference in New Issue
Block a user