mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/NetworkIO: Fix performance loss when handling bad packets
Revert f9cb4280bd which retrieved the callstack each time a ByteBufferPositionException or a ByteBufferSourceException occurred, for example with bad packet structure.
This commit is contained in:
@@ -27,11 +27,10 @@ ByteBufferPositionException::ByteBufferPositionException(bool add, size_t pos,
|
||||
size_t size, size_t valueSize)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ACE_Stack_Trace trace;
|
||||
|
||||
ss << "Attempted to " << (add ? "put" : "get") << " value with size: "
|
||||
<< valueSize << " in ByteBuffer (pos: " << pos << " size: " << size
|
||||
<< ")\n\n" << trace.c_str();
|
||||
<< ")";
|
||||
|
||||
message().assign(ss.str());
|
||||
}
|
||||
@@ -40,12 +39,10 @@ ByteBufferSourceException::ByteBufferSourceException(size_t pos, size_t size,
|
||||
size_t valueSize)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ACE_Stack_Trace trace;
|
||||
|
||||
ss << "Attempted to put a "
|
||||
<< (valueSize > 0 ? "NULL-pointer" : "zero-sized value")
|
||||
<< " in ByteBuffer (pos: " << pos << " size: " << size << ")\n\n"
|
||||
<< trace.c_str();
|
||||
<< " in ByteBuffer (pos: " << pos << " size: " << size << ")";
|
||||
|
||||
message().assign(ss.str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user