【发布时间】:2021-05-27 18:07:32
【问题描述】:
我在 React Native 中使用 Pusher。
尝试从调试控制台获取消息。
成功获得 2 条消息,并且在我在控制台中收到此消息后:
Pusher : : [{"type":"PusherError","data":{"code":4009,"message":"Connection not authorized within timeout"}}]
Pusher : : ["State changed","connected -> disconnected"]
Pusher : : [{"type":"WebSocketError","error":{"type":"PusherError","data":{"code":4009,"message":"Connection not authorized within timeout"}}}]
这是我的绑定:
channel.bind("Chat", function (data) {
var newArr = initialMessages.reverse();
var message = creteNewMessage(JSON.stringify(data));
newArr.push(message);
console.log(newArr);
});
没有消息到达。
【问题讨论】: