mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2026-05-08 18:02:09 -04:00
v0.0.7
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "uWebSockets.js",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"main": "uws.js"
|
||||
}
|
||||
|
||||
16
uws.js
16
uws.js
@@ -18,8 +18,20 @@
|
||||
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(...args));
|
||||
/* We are not compatible with Node.js nextTick and/or domains */
|
||||
process.nextTick = (f, ...args) => {
|
||||
uWS.nextTick(() => {
|
||||
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());
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user