@rails/actioncable 7.0.2 → 7.0.3
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
package/src/connection.js
CHANGED
@@ -44,7 +44,8 @@ class Connection {
|
|
44
44
|
|
45
45
|
close({allowReconnect} = {allowReconnect: true}) {
|
46
46
|
if (!allowReconnect) { this.monitor.stop() }
|
47
|
-
|
47
|
+
// Avoid closing websockets in a "connecting" state due to Safari 15.1+ bug. See: https://github.com/rails/rails/issues/43835#issuecomment-1002288478
|
48
|
+
if (this.isOpen()) {
|
48
49
|
return this.webSocket.close()
|
49
50
|
}
|
50
51
|
}
|