JS Client: Base events (reconnecting, connected, received etc.) are not unique to connection objects #1173

Closed
NTaylorMullen opened this Issue Dec 19, 2012 · 1 comment

Comments

Projects
None yet
3 participants
Contributor

NTaylorMullen commented Dec 19, 2012

When working on #1133 I found that when trying to write multiple tests that utilized the .received handler we would get events bound to every object alive.

Example:

We create 2 connections on the same page:

Connection A
Connection B

With A all we do is start then stop the connection.
With B we create a client side method foo.

After starting connection B the server responds by requesting the client to trigger method foo.

Result: Both A and B try to trigger foo even though we never bound anything to A.

This obviously causes errors and should be fixed.

@NTaylorMullen NTaylorMullen added a commit that referenced this issue Dec 20, 2012

@NTaylorMullen NTaylorMullen Moved the configureStopReconnectingTimeout to the Start function
- Also added the _ for private variables for the signalR library.
- When we had the configureStopReconnectingTimeout in the init portion
of the library any hub connections would be created all sharing the same
jQuery data.  This would in turn cause all events bound to any hub
connection to be shared.
#1173
9548a31

@NTaylorMullen NTaylorMullen added a commit that referenced this issue Dec 20, 2012

@NTaylorMullen @NTaylorMullen NTaylorMullen + NTaylorMullen Moved the configureStopReconnectingTimeout to the Start function
- Also added the _ for private variables for the signalR library.
- When we had the configureStopReconnectingTimeout in the init portion
of the library any hub connections would be created all sharing the same
jQuery data.  This would in turn cause all events bound to any hub
connection to be shared.
#1173
3a17c5d
Contributor

Xiaohongt commented Jan 6, 2013

verified

Xiaohongt closed this Jan 6, 2013

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