-
Notifications
You must be signed in to change notification settings - Fork 160
fix: stuck on "Connecting..." #1007
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
Closed
Closed
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ce19c44
ench: bounded response read
Dzuchun 46ecd55
add changelog entry
Dzuchun f8f860c
bump max response size to 5MiB
Dzuchun fe28cb0
bump max response size to 8Mi
Dzuchun e065772
go back to `CommandType`-based max response length
Dzuchun 933f272
changelog typo fix
Dzuchun 7a161c5
reintroduce and deprecate `read_response` function
Dzuchun 5f5b5c7
ench: elaborate on chosen response lengths
Dzuchun 5157803
fix: `max_response_length` visibility to crate
Dzuchun 1c9a47d
Merge branch 'main' into write-sync-fix
Dzuchun 494f13d
fix: feature-lock max response length stuff
Dzuchun 1b600c6
fix: bump max response length to 1Gi
Dzuchun dbf1758
fix: account for slip escape sequences (?)
Dzuchun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,9 @@ const SYNC_TIMEOUT: Duration = Duration::from_millis(100); | |
| const FLASH_DEFLATE_END_TIMEOUT: Duration = Duration::from_secs(10); | ||
| const FLASH_MD5_TIMEOUT_PER_MB: Duration = Duration::from_secs(8); | ||
|
|
||
| const SYNC_MAX_LEN: u64 = 44; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should add a comment about why you chose 44 |
||
| const DEFAULT_MAX_LEN: u64 = 8 * 1024 * 1024; // 8Mi by default | ||
|
|
||
| /// Input data for SYNC command (36 bytes: 0x07 0x07 0x12 0x20, followed by | ||
| /// 32 x 0x55) | ||
| const SYNC_FRAME: [u8; 36] = [ | ||
|
|
@@ -211,6 +214,14 @@ impl CommandType { | |
| _ => self.timeout(), | ||
| } | ||
| } | ||
|
|
||
| /// Return a max response length for the given [`CommandType`] | ||
| pub fn max_response_len(&self) -> u64 { | ||
|
SergioGasquez marked this conversation as resolved.
Outdated
|
||
| match self { | ||
| CommandType::Sync => SYNC_MAX_LEN, | ||
| _ => DEFAULT_MAX_LEN, | ||
| } | ||
| } | ||
| } | ||
|
|
||
| /// Available commands | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.