Put a category enabled filter on default switch case so we're not chewing up extra cpu cycles

This commit is contained in:
Akkadius 2017-02-13 01:26:19 -06:00
parent a81212e1b4
commit 92d4468326

View File

@ -99,9 +99,11 @@ bool Client::Process()
}
default:
{
char dump[64];
app->build_header_dump(dump);
Log.Out(Logs::General, Logs::Error, "Recieved unhandled application packet from the client: %s.", dump);
if (Log.log_settings[Logs::Client_Server_Packet_Unhandled].is_category_enabled == 1) {
char dump[64];
app->build_header_dump(dump);
Log.Out(Logs::General, Logs::Error, "Recieved unhandled application packet from the client: %s.", dump);
}
}
}