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

Multiple connections, returned functions use options from last connection #49

Open
LupusUmbrae opened this issue May 25, 2016 · 0 comments

Comments

@LupusUmbrae
Copy link

Hard to explain exactly what i meant, but the returned methods (open, setAuthId, ect) use options from the $wampProvider scope rather than using the options set on the current connection (on the $get scope)

this leads to some errors, for me my second connection has "wampcra" with an authid set after the first connection is opened.

The line i'm seeing the error is here: https://github.com/voryx/angular-wamp/blob/master/src/angular-wamp.js#L381

I think options from here needs to be moved to this level

I put a breakpoint in chrome and used the console to print options and connection._options:

> connection._options
Object {url: "ws://localhost:8080/ws", realm: "realm1", authid: "", transports: Array[1]}
> options
Object {url: "ws://localhost:8080/ws", realm: "realm1", prefix: "$wampAuth", authmethods: Array[1], transports: Array[1]}
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