无法连接到可操作的插座并且没有错误和拒绝 - 我该怎么办?
一些用户无法连接到我的插座,我不知道为什么。我看不到任何错误,但我确实看到它们从未真正连接。这是什么原因是什么,我该怎么办?我正在使用Rails ActionCtacticact。
我看到这是称为的,并且存在房间ID。
window.subscription_channel = consumer.subscriptions.create({channel: "RoomChannel",room: $("[data-room-id]").data("room-id")},
{
connected: this._connected.bind(this),
disconnected: this._disconnected.bind(this),
received: this._received.bind(this),
rejected: this._rejected.bind(this)
}
);
一旦连接,我设置了一个变量
_connected() {
window.socket_has_connected_to_room = true
console.log("connected to room via action cable socket")
}
,我在15秒后进行检查,然后查看window.socket_has_connected_to_room
变量不正确,并且可以看到subbcription_channel存在并可以验证window.subscription_channelel.consumer.consumer.connection。断开连接是正确的。在这种情况下我该怎么办?
Some users are unable to connect to my socket and I have no idea why. I don't see any errors but I do see that they never actually connect. What can be the cause of this and what should I do? I am using Rails actioncable.
I see this is called and the room id is present.
window.subscription_channel = consumer.subscriptions.create({channel: "RoomChannel",room: $("[data-room-id]").data("room-id")},
{
connected: this._connected.bind(this),
disconnected: this._disconnected.bind(this),
received: this._received.bind(this),
rejected: this._rejected.bind(this)
}
);
And once it connects I set a variable
_connected() {
window.socket_has_connected_to_room = true
console.log("connected to room via action cable socket")
}
I do a check after 15 seconds and see the window.socket_has_connected_to_room
variable is not true and can see the subscription_channel is present and can verify window.subscription_channel.consumer.connection.disconnected is true. What can I do in this scenario?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论