Skip to content

Commit

Permalink
Changed the fireReconnected event within the LP transport to correctl…
Browse files Browse the repository at this point in the history
…y pass in the connections instance object.

- This ensures that if a LP transport receives a message after attempting to reconnect but prior to reconnected being triggered that the reconnected event will fire.

#2353
  • Loading branch information
NTaylorMullen committed Jul 29, 2013
1 parent 1314a04 commit 3d9c18f
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -47,11 +47,11 @@
window.clearTimeout(privateData.reconnectTimeoutId);
privateData.reconnectTimeoutId = null;

if (changeState(connection,
if (changeState(instance,
signalR.connectionState.reconnecting,
signalR.connectionState.connected) === true) {
// Successfully reconnected!
connection.log("Raising the reconnect event");
instance.log("Raising the reconnect event");
$(instance).triggerHandler(events.onReconnect);
}
},
Expand Down Expand Up @@ -108,7 +108,7 @@

// If there's currently a timeout to trigger reconnect, fire it now before processing messages
if (privateData.reconnectTimeoutId !== null) {
fireReconnected();
fireReconnected(instance);
}

if (minData) {
Expand Down

0 comments on commit 3d9c18f

Please sign in to comment.