updated inbound raw size to the request size

This commit is contained in:
ArnabChatterjee20k
2026-03-06 15:37:30 +05:30
parent ece5b81732
commit 0ea196d21c
+4 -11
View File
@@ -720,18 +720,11 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server,
throw new Exception(Exception::REALTIME_TOO_MANY_MESSAGES, 'Too many requests');
}
// Record realtime inbound bytes for this project (WS handshake + query params)
try {
$rawSize = $request->getSize();
} catch (Throwable) {
$rawSize = \strlen((string) $request->getURI());
}
$rawSize = $request->getSize();
if ($rawSize > 0) {
triggerStats([
METRIC_REALTIME_INBOUND => $rawSize,
], $project->getId());
}
triggerStats([
METRIC_REALTIME_INBOUND => $rawSize,
], $project->getId());
/*
* Validate Client Domain - Check to avoid CSRF attack.