Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idp.getInstance() is called two times in MessagingStub_NodeJS #36

Open
d-koppenhagen opened this issue May 27, 2015 · 0 comments
Open

Comments

@d-koppenhagen
Copy link

As you can see here the function Idp.getInstance() is called two times (once in Lin 115 and once in Line119 inside Idp.getInstance().createIdentity()).
As both Idp instances should be the same, I think this would be a better way without calling Idp.getInstance() two times:

var thatIdp = Idp.getInstance();
that.createIdentity(message.from, function(identity) {
    message.from = identity;
    thatIdp.createIdentities(message.to, function(identityArr) {
        message.to = identityArr;
        that.baseStub.sendOtherMessages(message);
    });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant