Permalink
Browse files

fix server startup bug

  • Loading branch information...
changchang committed Feb 28, 2013
1 parent ca4e81b commit 5e12c67da505b92ca0ee18d51db48c1ccf1b6e06
Showing with 9 additions and 4 deletions.
  1. +7 −2 lib/components/proxy.js
  2. +1 −1 lib/modules/watchdog.js
  3. +1 −1 package.json
View
@@ -66,8 +66,13 @@ pro.start = function(cb) {
* @return {Void}
*/
pro.afterStart = function(cb) {
this.app.set('rpc', this.client.proxies.user, true);
this.app.set('sysrpc', this.client.proxies.sys, true);
var self = this;
this.app.__defineGetter__('rpc', function() {
return self.client.proxies.user;
});
this.app.__defineGetter__('sysrpc', function() {
return self.client.proxies.sys;
});
this.app.set('rpcInvoke', this.client.rpcInvoke.bind(this.client), true);
this.client.start(cb);
};
View
@@ -61,7 +61,7 @@ Module.prototype.masterHandler = function(agent, msg, cb) {
// ----------------- master watchdog -------------------------
var onServerAdd = function(module, record) {
if(!record || record.type === 'client') {
if(!record || record.type === 'client' || !record.serverType) {
return;
}
View
@@ -13,7 +13,7 @@
"pomelo-loader": "0.0.4",
"pomelo-rpc": "0.1.0",
"pomelo-protocol": "0.0.3",
"pomelo-admin": "0.0.19",
"pomelo-admin": "0.1.0",
"pomelo-monitor": "0.3.5",
"pomelo-logger": "0.0.2",
"ws": "0.4.25"

0 comments on commit 5e12c67

Please sign in to comment.