New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Append "/poll" to polling attempts in case the URL ends with "/hubs" #1767
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,7 +355,7 @@ | |
if (index >= transports.length) { | ||
if (!connection.transport) { | ||
// No transport initialized successfully | ||
$(connection).triggerHandler(events.onError, "SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."); | ||
$(connection).triggerHandler(events.onError, ["SignalR: No transport could be initialized successfully. Try specifying a different transport or none at all for auto initialization."]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. triggerHandler expects an array. It came up when I was trying to figure out why my JS test was failing in Chutzpah but not in normal browsers. I made this change in its own commit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we missing this in other cases? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope |
||
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(); | ||
|
@@ -445,7 +445,7 @@ | |
} | ||
|
||
if (!res.ProtocolVersion || res.ProtocolVersion !== "1.2") { | ||
$(connection).triggerHandler(events.onError, "You are using a version of the client that isn't compatible with the server. Client version 1.2, server version " + res.ProtocolVersion + "."); | ||
$(connection).triggerHandler(events.onError, ["You are using a version of the client that isn't compatible with the server. Client version 1.2, server version " + res.ProtocolVersion + "."]); | ||
deferred.reject("You are using a version of the client that isn't compatible with the server. Client version 1.2, server version " + res.ProtocolVersion + "."); | ||
return; | ||
} | ||
|
@@ -801,7 +801,11 @@ | |
} else { | ||
if (appendReconnectUrl) { | ||
url = url + "/reconnect"; | ||
} else { | ||
// A silent reconnect should only ever occur with the longPolling transport | ||
url = url + "/poll"; | ||
} | ||
|
||
if (connection.messageId) { | ||
qs += "&messageId=" + window.encodeURIComponent(connection.messageId); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silent reconnect... sigh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to sneak it in somewhere!