diff --git a/uws.js b/uws.js index 23a01a0a..afbd2e5f 100644 --- a/uws.js +++ b/uws.js @@ -15,9 +15,25 @@ * limitations under the License. */ +let process = require('node:process'); +let guWS = undefined; + +function pump() { + guWS.pump(); + setImmediate(pump); +} + +function setup(uWS) { + if (process.env.ALIEN_UWS) { + guWS = uWS; + setImmediate(pump); + } + return uWS; +} + module.exports = (() => { try { - return require('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node'); + return setup(require('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node')); } catch (e) { throw new Error('This version of uWS.js supports only Node.js LTS versions 16, 18 and 20 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString()); } diff --git a/uws_linux_arm_108.node b/uws_linux_arm_108.node index f7dc22f1..7d19d202 100755 Binary files a/uws_linux_arm_108.node and b/uws_linux_arm_108.node differ diff --git a/uws_linux_arm_115.node b/uws_linux_arm_115.node index 2c13ec89..34f9e375 100755 Binary files a/uws_linux_arm_115.node and b/uws_linux_arm_115.node differ diff --git a/uws_linux_arm_93.node b/uws_linux_arm_93.node index 6ecb8c4f..ee1aeda8 100755 Binary files a/uws_linux_arm_93.node and b/uws_linux_arm_93.node differ