Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #622 from keqinzhao/patch-2
Browse files Browse the repository at this point in the history
bugfix: wrong scope for this
  • Loading branch information
cynron committed Sep 29, 2014
2 parents d17635f + 6ba45ad commit 2fbd801
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/common/service/channelService.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ ChannelService.prototype.broadcast = function(stype, route, msg, opts, cb) {
};
};

var self = this;
var sendMessage = function(serverId) {
return (function() {
if(serverId === app.serverId) {
this.channelRemote[method](route, msg, opts, genCB());
self.channelRemote[method](route, msg, opts, genCB());
} else {
app.rpcInvoke(serverId, {namespace: namespace, service: service,
method: method, args: [route, msg, opts]}, genCB(serverId));
Expand Down

0 comments on commit 2fbd801

Please sign in to comment.