Skip to content

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

Description

@Mossinarium

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]}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions