Skip to content

Commit

Permalink
Update uws.js
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB authored Mar 1, 2019
1 parent bb0f1b9 commit 660d97b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions uws.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 660d97b

Please sign in to comment.