Fix completely broken process.nextTick
This commit is contained in:
parent
d23e83628d
commit
6a96e07c3c
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue