From 12b9e750e9795c3ba4bee1d9b003e55de14ff4d7 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 26 Oct 2021 18:05:50 -0700 Subject: [PATCH] chore: Avoid buffer alloc --- server/services/collaboration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/services/collaboration.js b/server/services/collaboration.js index bd3773cfc..5619864ef 100644 --- a/server/services/collaboration.js +++ b/server/services/collaboration.js @@ -26,7 +26,7 @@ export default function init(app: Koa, server: http.Server) { if (req.url.indexOf(path) > -1) { const documentName = url.parse(req.url).pathname?.split("/").pop(); - wss.handleUpgrade(req, socket, Buffer.alloc(0), (client) => { + wss.handleUpgrade(req, socket, head, (client) => { hocuspocus.handleConnection(client, req, documentName); }); }