Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stop the active transport before making an /abort request (JS Client)

- Desktop and mobile Safari will sometimes crash if a synchronous request
  is made during unload with an ongoing WebSocket connection open
- Stopping the ongoing WebSocket connection before making the /abort
  request during unload prevents Safari from crashing

#2650
  • Loading branch information...
commit 1f8066488a7b7e38433170e17ab5eac0a78c6d2e 1 parent 812e1e5
@halter73 halter73 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/Microsoft.AspNet.SignalR.Client.JS/jquery.signalR.core.js
View
3  src/Microsoft.AspNet.SignalR.Client.JS/jquery.signalR.core.js
@@ -913,6 +913,8 @@
window.clearInterval(connection._.pingIntervalId);
if (connection.transport) {
+ connection.transport.stop(connection);
+
if (notifyServer !== false) {
connection.transport.abort(connection, async);
}
@@ -921,7 +923,6 @@
signalR.transports._logic.stopMonitoringKeepAlive(connection);
}
- connection.transport.stop(connection);
connection.transport = null;
}
Please sign in to comment.
Something went wrong with that request. Please try again.