chore: Avoid buffer alloc

This commit is contained in:
Tom Moor 2021-10-26 18:05:50 -07:00
parent 1819920c04
commit 12b9e750e9
1 changed files with 1 additions and 1 deletions

View File

@ -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);
});
}