From 96e66f870724bc47ffeb8f38221afdfaf0446e53 Mon Sep 17 00:00:00 2001 From: Samson Nkrumah Date: Wed, 8 Apr 2026 06:56:07 +0100 Subject: [PATCH] hotfix: revert BATCH_CONNECTION_REQUESTS default to False PR #13 changed the default to True, but batching is broken: 1. SDK: addConnection expects an immediate response with connection_id and peer_id. With batching, sendConnectionEvent queues the event and returns undefined, causing the SDK to throw and remove the connection. 2. API: the batch endpoint (ConnectionEventBatchView) returns an empty 200 with no connection_id or peer_id, so even if the SDK didn't crash, it couldn't map subsequent events to the connection. Reverting to False (original behavior) to prevent connection monitoring from breaking in production. --- api/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/settings.py b/api/settings.py index 32a7758..c059d7e 100644 --- a/api/settings.py +++ b/api/settings.py @@ -149,7 +149,7 @@ # Other App defaults DEFAULT_INTERVAL = int(os.getenv('STATS_INTERVAL_MS', 10000)) -BATCH_CONNECTION_REQUESTS = os.getenv('BATCH_CONNECTION_REQUESTS', 'True').lower() == 'true' +BATCH_CONNECTION_REQUESTS = os.getenv('BATCH_CONNECTION_REQUESTS', 'False').lower() == 'true' INIT_TOKEN_SECRET = os.getenv('INIT_TOKEN_SECRET') SESSION_TOKEN_SECRET = os.getenv('SESSION_TOKEN_SECRET')