Permalink
Browse files

Merge pull request #573 from NTaylorMullen/Issue-#485

Added error handling for no transport cases
  • Loading branch information...
2 parents 2fa8af2 + 2374572 commit 22459ea5017e4831cdf31b6a0c5671b4e6d0f71e @NTaylorMullen NTaylorMullen committed Aug 2, 2012
@@ -222,7 +222,10 @@
if (index >= transports.length) {
if (!connection.transport) {
// No transport initialized successfully
+ $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
+ // Stop the connection if it has connected and move it into the disconnected state
+ connection.stop();
}
return;
}
@@ -223,7 +223,10 @@
if (index >= transports.length) {
if (!connection.transport) {
// No transport initialized successfully
+ $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
+ // Stop the connection if it has connected and move it into the disconnected state
+ connection.stop();
}
return;
}

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -223,7 +223,10 @@
if (index >= transports.length) {
if (!connection.transport) {
// No transport initialized successfully
+ $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
+ // Stop the connection if it has connected and move it into the disconnected state
+ connection.stop();
}
return;
}

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -223,7 +223,10 @@
if (index >= transports.length) {
if (!connection.transport) {
// No transport initialized successfully
+ $(connection).trigger(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
deferred.reject("SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization.");
+ // Stop the connection if it has connected and move it into the disconnected state
+ connection.stop();
}
return;
}

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 22459ea

Please sign in to comment.