mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
remove heuristic from read loop, now that read works.
This commit is contained in:
parent
89cba7250e
commit
1cf0479528
1 changed files with 3 additions and 2 deletions
|
|
@ -368,7 +368,7 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
||||||
let mut rx_buf = [0u8; CHUNK];
|
let mut rx_buf = [0u8; CHUNK];
|
||||||
log::info!("starting read loop");
|
log::info!("starting read loop");
|
||||||
// stream.set_nonblocking(true).expect("couldn't set stream to nonblocking");
|
// stream.set_nonblocking(true).expect("couldn't set stream to nonblocking");
|
||||||
let mut last_chunk = 0;
|
// let mut last_chunk = 0;
|
||||||
loop {
|
loop {
|
||||||
match stream.read(&mut rx_buf) {
|
match stream.read(&mut rx_buf) {
|
||||||
Ok(len) => {
|
Ok(len) => {
|
||||||
|
|
@ -379,6 +379,7 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
||||||
log::info!("got 0-length read, concluding we're at an EOF...");
|
log::info!("got 0-length read, concluding we're at an EOF...");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if last_chunk == 0 {
|
if last_chunk == 0 {
|
||||||
last_chunk = len;
|
last_chunk = len;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -386,7 +387,7 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
||||||
log::info!("heuristic termination of read loop");
|
log::info!("heuristic termination of read loop");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
},
|
},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::info!("quitting read loop with err {:?}", e);
|
log::info!("quitting read loop with err {:?}", e);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue