Skip to content

Commit 01eef9f

Browse files
committed
Fix network debug compiling on master due to #267
1 parent 0f72acb commit 01eef9f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/protocol/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,10 +1041,8 @@ impl Conn {
10411041
}
10421042

10431043
pub fn write_packet<T: PacketType>(&mut self, packet: T) -> Result<(), Error> {
1044-
let network_debug = unsafe { NETWORK_DEBUG };
1045-
1046-
/* TODO: debug printing packets to send
1047-
if network_debug {
1044+
/* TODO: fix Packet doesn't implement std::fmt::Debug
1045+
if is_network_debug() {
10481046
println!("about to send {:?}", packet);
10491047
}
10501048
*/
@@ -1053,7 +1051,7 @@ impl Conn {
10531051
VarInt(packet.packet_id(self.protocol_version)).write_to(&mut buf)?;
10541052
packet.write(&mut buf)?;
10551053

1056-
if network_debug {
1054+
if is_network_debug() {
10571055
println!("sent bytes {:?}", buf);
10581056
}
10591057

0 commit comments

Comments
 (0)