uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
7.76k stars 563 forks source link

"Cork buffer must not be held across event loop iterations!" error when doing async work inside `upgrade` handler #936

Closed ucarno closed 1 year ago

ucarno commented 1 year ago

App crashes with Cork buffer must not be held across event loop iterations! error when I cork response.upgrade inside async function (version v20.30.0).

Tried this example without any modifications and it also gives me the same error.

ucarno commented 1 year ago

Seems like I was using older version that didn't get updated when modifying package.json and executing npm i. npm i uNetworking/uWebSockets.js#v20.30.0 installed the latest version and now everything works fine.