QianmiOpen / dubbo-node-client

the node module of dubbo client
61 stars 28 forks source link

关于停止与其他相关问题 #6

Open zhouxianjun opened 8 years ago

zhouxianjun commented 8 years ago

作者您好! 首先有个疑问,我只要加载dubbo-node-client在停止的时候往往都停止不了,也可能是我等的时间短,还还有就是 获取不到 group 的service。 还有个BUG: 在重启service后 客户端则会报以下异常: node_modules\dubbo-node-client\lib\registry\index.js:95 client.getChildren(path, ^

TypeError: Cannot read property 'getChildren' of undefined at node_modules\dubbo-node-client\lib\registry\index.js:95:19 at EventEmitter. (node_modules\dubbo-node-client\lib\registry\index.js:97:21) at EventEmitter.g (events.js:260:16) at emitOne (events.js:77:13) at EventEmitter.emit (events.js:169:7) at node_modules\dubbo-node-client\node_modules\node-zookeeper-client\lib\WatcherManager.js:126:17 at Array.forEach (native) at WatcherManager.emit (node_modules\dubbo-node-client\node_modules\node-zookeeper-client\lib\WatcherManager.js:125:14) at ConnectionManager.onSocketData (node_modules\dubbo-node-client\node_modules\node-zookeeper-client\lib\ConnectionManager.js:475:33) at emitOne (events.js:77:13)

zhouxianjun commented 8 years ago

然而service正常情况下 会 打印:Registry : 获取权重失败 [world.service.PlayerRoleService] [ 尚未发现服务提供者 ]

zhouxianjun commented 8 years ago

那个 停止的问题 找到了 process.on('SIGINT', registry.destroy); 这个函数 没有执行退出,所以导致程序还在等待。

dreamstu commented 8 years ago

@zhouxianjun lib/registry/index.js --> 将callee() -->改为 callee(client);