chore: Avoid buffer alloc
This commit is contained in:
parent
1819920c04
commit
12b9e750e9
|
@ -26,7 +26,7 @@ export default function init(app: Koa, server: http.Server) {
|
||||||
if (req.url.indexOf(path) > -1) {
|
if (req.url.indexOf(path) > -1) {
|
||||||
const documentName = url.parse(req.url).pathname?.split("/").pop();
|
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);
|
hocuspocus.handleConnection(client, req, documentName);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue