File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,12 +20,14 @@ const SYNC_TIMEOUT: Duration = Duration::from_millis(100);
2020const FLASH_DEFLATE_END_TIMEOUT : Duration = Duration :: from_secs ( 10 ) ;
2121const FLASH_MD5_TIMEOUT_PER_MB : Duration = Duration :: from_secs ( 8 ) ;
2222
23- // max response length for a non-vector request
23+ // 44 is a max response length for a non-vector request.
24+ // doubling is performed due to possible escapes in the slip decoder
2425#[ cfg( feature = "serialport" ) ]
25- const SYNC_MAX_LEN : u64 = 44 ;
26- // 1Gi, max response length ever expected
26+ const SYNC_MAX_LEN : u64 = 44 * 2 ;
27+ // 8Mi is a max response length ever expected
28+ // doubling is performed due to possible escapes in the slip decoder
2729#[ cfg( feature = "serialport" ) ]
28- pub ( crate ) const DEFAULT_MAX_LEN : u64 = 1024 * 1024 * 1024 ;
30+ pub ( crate ) const DEFAULT_MAX_LEN : u64 = 8 * 1024 * 1024 * 2 ;
2931
3032/// Input data for SYNC command (36 bytes: 0x07 0x07 0x12 0x20, followed by
3133/// 32 x 0x55)
You can’t perform that action at this time.
0 commit comments