mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
add a timeout for the network to disconnect before starting update
this is to avoid panics due to malformed "packets" being received as the EC is updating and not working correctly.
This commit is contained in:
parent
b39f4c38eb
commit
ee39b9643e
1 changed files with 3 additions and 0 deletions
|
|
@ -487,6 +487,9 @@ impl<'a> ShellCmdApi<'a> for EcUpdate {
|
|||
}
|
||||
|
||||
env.netmgr.connection_manager_stop().unwrap();
|
||||
env.com.wlan_leave().ok();
|
||||
env.ticktimer.sleep_ms(4000).unwrap(); // give a few seconds for any packets/updates to clear so we don't tigger panics as the EC is about to disappear...
|
||||
|
||||
self.in_progress = true;
|
||||
let start = env.ticktimer.elapsed_ms();
|
||||
self.start_time = Some(start);
|
||||
|
|
|
|||
Loading…
Reference in a new issue