From 660d97b287808e8a5eab4cc1fe1b1a1a59249b1e Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Fri, 1 Mar 2019 19:53:56 +0100 Subject: [PATCH] Update uws.js --- uws.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/uws.js b/uws.js index 2f418a76..2ad88fae 100644 --- a/uws.js +++ b/uws.js @@ -20,18 +20,10 @@ module.exports = (() => { const uWS = require(`./uws_${process.platform}_${process.versions.modules}.node`); /* We are not compatible with Node.js nextTick and/or domains */ process.nextTick = (f, ...args) => { - uWS.nextTick(() => { + Promise.resolve().then(() => { f(...args); }); }; - process.on('beforeExit', () => { - if (uWS.processNextTickQueue()) { - setImmediate(() => { - - }); - } - }); - /* process.nextTick = setImmediate; */ return uWS; } catch (e) { throw new Error('This version of µWS is not compatible with your Node.js build.\n\n' + e.toString());