From 5c4bae8f2639831e0a6d3faa19c0234d47d252c3 Mon Sep 17 00:00:00 2001 From: Jake Probst Date: Sun, 25 Aug 2019 04:50:45 -0700 Subject: [PATCH] show error for unknown packets --- src/common/client.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/client.rs b/src/common/client.rs index 51c2874..1b2dce8 100644 --- a/src/common/client.rs +++ b/src/common/client.rs @@ -70,6 +70,7 @@ impl Client 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 Client 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;