Browse Source

show error for unknown packets

pbs
Jake Probst 5 years ago
parent
commit
5c4bae8f26
  1. 2
      src/common/client.rs

2
src/common/client.rs

@ -70,6 +70,7 @@ impl<S, R, E> Client<S, R, E> where
fn send(&mut self, pkt: S) {
println!("[send] {:?}", pkt);
let buf = pkt.as_bytes();
println!("[send: buf] {:?}", buf);
let mut cbuf = self.cipher_out.encrypt(&buf).unwrap();
self.send_buffer.append(&mut cbuf);
self.send_data();
@ -107,6 +108,7 @@ impl<S, R, E> Client<S, R, E> where
Err(err) => {
match err {
PacketNetworkError::ClientDisconnected => self.running = false,
PacketNetworkError::PacketParseError(err) => println!("undef pkt {:?}: {:?}", self.socket, err),
_ => {} //println!("error recv-ing packet with {:?}: {:?}", self.socket, err),
}
break;

Loading…
Cancel
Save