Remove eprintln in lieu of better error reporting
This commit is contained in:
parent
ca09821cbc
commit
a634947da1
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tapir-cwtch"
|
name = "tapir-cwtch"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
authors = ["Sarah Jamie Lewis <sarah@openprivacy.ca>"]
|
authors = ["Sarah Jamie Lewis <sarah@openprivacy.ca>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -88,7 +88,7 @@ impl<Direction> ConnectionInterface for Connection<Direction> {
|
||||||
let mut result = [0u8; 8192];
|
let mut result = [0u8; 8192];
|
||||||
match self.conn.read_exact(&mut result) {
|
match self.conn.read_exact(&mut result) {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
eprintln!("{}", e.to_string());
|
//eprintln!("{}", e.to_string());
|
||||||
return vec![];
|
return vec![];
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -105,7 +105,7 @@ impl<Direction> ConnectionInterface for Connection<Direction> {
|
||||||
let _len_bytes = [0u8; 2];
|
let _len_bytes = [0u8; 2];
|
||||||
let len = u16::decode_fixed(&msg[0..2]) as usize;
|
let len = u16::decode_fixed(&msg[0..2]) as usize;
|
||||||
if len > 8192 {
|
if len > 8192 {
|
||||||
eprintln!("invalid length: {}", len);
|
//eprintln!("invalid length: {}", len);
|
||||||
return vec![]; // lol no.
|
return vec![]; // lol no.
|
||||||
}
|
}
|
||||||
msg[2..len + 2].to_vec()
|
msg[2..len + 2].to_vec()
|
||||||
|
|
Loading…
Reference in New Issue