@rails/actioncable 7.0.2 → 7.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
|
}
|