mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix(realtime): undefined projectId for shared stats
This commit is contained in:
1 parent
27fde80a09
commit
ae8320e4fe
2 files changed
+3
-2
No files matched your search
@@ -6,7 +6,6 @@ use Utopia\Storage\Device\Local;
|
||||
use Utopia\Storage\Storage;
|
||||
use Appwrite\ClamAV\Network;
|
||||
use Appwrite\Event\Event;
|
||||
use RuntimeException;
|
||||
|
||||
App::get('/v1/health')
|
||||
->desc('Get HTTP')
|
||||
|
||||
+3
-1
@@ -324,7 +324,9 @@ $server->on('message', function (Server $server, Frame $frame) {
|
||||
});
|
||||
|
||||
$server->on('close', function (Server $server, int $connection) use (&$connections, &$subscriptions, &$stats) {
|
||||
$stats->decr($connections[$connection]['projectId'], 'connectionsTotal');
|
||||
if (array_key_exists($connection, $connections)) {
|
||||
$stats->decr($connections[$connection]['projectId'], 'connectionsTotal');
|
||||
}
|
||||
Realtime::unsubscribe($connection, $subscriptions, $connections);
|
||||
Console::info('Connection close: ' . $connection);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user