v1.0.2
This commit is contained in:
parent
a43a8347a9
commit
1fbd2a4b71
|
@ -92,6 +92,7 @@ module.exports.create = function (opts) {
|
||||||
var PromiseA = opts.PromiseA || global.Promise || require('bluebird');
|
var PromiseA = opts.PromiseA || global.Promise || require('bluebird');
|
||||||
var init = false;
|
var init = false;
|
||||||
|
|
||||||
|
opts._promise = PromiseA.resolve(opts.instance);
|
||||||
opts._promise.addWorker = function (w) {
|
opts._promise.addWorker = function (w) {
|
||||||
if (!init) {
|
if (!init) {
|
||||||
init = true;
|
init = true;
|
||||||
|
@ -100,7 +101,5 @@ module.exports.create = function (opts) {
|
||||||
return opts.master.addWorker(w);
|
return opts.master.addWorker(w);
|
||||||
};
|
};
|
||||||
|
|
||||||
opts._promise = PromiseA.resolve(opts.instance);
|
|
||||||
|
|
||||||
return opts._promise;
|
return opts._promise;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cluster-rpc",
|
"name": "cluster-rpc",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "A simple way to wrap a single-instance module to enable it to work with node cluster.",
|
"description": "A simple way to wrap a single-instance module to enable it to work with node cluster.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue