Skip to content

Commit 804f9b2

Browse files
hotfix: revert BATCH_CONNECTION_REQUESTS default to False (#18)
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.
1 parent 49125cf commit 804f9b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
# Other App defaults
150150
DEFAULT_INTERVAL = int(os.getenv('STATS_INTERVAL_MS', 10000))
151151

152-
BATCH_CONNECTION_REQUESTS = os.getenv('BATCH_CONNECTION_REQUESTS', 'True').lower() == 'true'
152+
BATCH_CONNECTION_REQUESTS = os.getenv('BATCH_CONNECTION_REQUESTS', 'False').lower() == 'true'
153153

154154
INIT_TOKEN_SECRET = os.getenv('INIT_TOKEN_SECRET')
155155
SESSION_TOKEN_SECRET = os.getenv('SESSION_TOKEN_SECRET')

0 commit comments

Comments
 (0)