Fix completely broken process.nextTick

This commit is contained in:
Alex Hultman 2019-01-14 17:16:00 +01:00
parent d23e83628d
commit 6a96e07c3c
1 changed files with 3 additions and 2 deletions

5
dist/uws.js vendored
View File

@ -1,5 +1,6 @@
/*
* Copyright 2018 Alex Hultman and contributors.
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -18,7 +19,7 @@ module.exports = (() => {
try {
const uWS = require(`./uws_${process.platform}_${process.versions.modules}.node`);
/* We are not compatible with Node.js domain */
process.nextTick = (f, ...args) => uWS.nextTick(f.apply(...args));
process.nextTick = (f, ...args) => uWS.nextTick(() => f(...args));
return uWS;
} catch (e) {
throw new Error('This version of µWS is not compatible with your Node.js build.\n\n' + e.toString());