This commit is contained in:
Lily Tsuru 2024-03-10 06:52:14 -04:00
parent 315a3927f3
commit ee6446a624
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ namespace ls {
try {
co_await asio::async_read(stream, asio::buffer(&header, sizeof(header)), asio::deferred);
// Sanity check. I don't expect game payloa
// Sanity check. I don't expect game payloads to ever reach this large, but who knows.
if(header.payloadSize > MAX_PAYLOAD_SIZE) {
logger->error("WOAH! Message size {} MB larger than {}MB..", (static_cast<float>(header.payloadSize) / 1024 / 1024), (static_cast<float>(MAX_PAYLOAD_SIZE) / 1024 / 1024));
co_return nullptr;