Permalink
Browse files

Fixed previous fixes to Issue #598

Fixed bug in JS and .NET clients where StateChanged events would be passed a
copy of the new state in lieu of the old state.
  • Loading branch information...
1 parent b0b2e81 commit 5d1e1abcd70e98b15d62ae442f99dfa068ff8ae6 @halter73 halter73 committed Oct 16, 2012
@@ -74,7 +74,7 @@
changeState = function (connection, expectedState, newState) {
if (expectedState === connection.state) {
connection.state = newState;
- $(connection).trigger(events.onStateChanged, [{ oldState: connection.state, newState: newState }]);
+ $(connection).trigger(events.onStateChanged, [{ oldState: expectedState, newState: newState }]);
return true;
}
@@ -1184,6 +1184,9 @@
url = transportLogic.getUrl(connection, this.name);
url += "&frameId=" + frameId;
+ // Set body prior to setting URL to avoid caching issues.
+ $("body").append(frame);
+
frame.prop("src", url);
transportLogic.foreverFrame.connections[frameId] = connection;
@@ -1203,8 +1206,6 @@
connection.onSuccess = onSuccess;
}
- $("body").append(frame);
-
// After connecting, if after the specified timeout there's no response stop the connection
// and raise on failed
// REVIEW: Why is connectTimeOut set here and never used again?
Oops, something went wrong. Retry.

0 comments on commit 5d1e1ab

Please sign in to comment.