kuzzle 2.34.0 → 2.35.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -313,12 +313,22 @@ class HttpWsProtocol extends Protocol {
313
313
  return;
314
314
  }
315
315
 
316
+ const reason = Buffer.from(message || "").toString();
317
+
318
+ // This hack is only here to indicate that uWebSockets killed the connection early
319
+ // because the received payload exceeded the configured threshold.
320
+ if (code === 1006 && reason.startsWith("Received too big message")) {
321
+ global.kuzzle.log.error(
322
+ `[${connection.id}] connection closed: payload exceeded the threshold`,
323
+ );
324
+ }
325
+
316
326
  if (debugWS.enabled) {
317
327
  debugWS(
318
328
  "[%s] received a `close` event (CODE: %d, REASON: %s)",
319
329
  connection.id,
320
330
  code,
321
- Buffer.from(message || "").toString(),
331
+ reason,
322
332
  );
323
333
  }
324
334
  this.entryPoint.removeConnection(connection.id);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.34.0",
4
+ "version": "2.35.0-beta.1",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "bin": "bin/start-kuzzle-server",
7
7
  "scripts": {