React native 5分钟后出现MQTT错误
我有一个React本机应用程序,需要与物联网(AWS)和WebSocket连接。我当前使用该软件包连接我的应用程序。这是我的密码:React native 5分钟后出现MQTT错误,react-native,mqtt,iot,React Native,Mqtt,Iot,我有一个React本机应用程序,需要与物联网(AWS)和WebSocket连接。我当前使用该软件包连接我的应用程序。这是我的密码: function getClient(onConnect, onConnectionFailed, onConnectionLost, onMessageArrived) { logger.trace('getClient()'); const clientID = uuidV4(); // Create a client instance c
function getClient(onConnect, onConnectionFailed, onConnectionLost,
onMessageArrived) {
logger.trace('getClient()');
const clientID = uuidV4();
// Create a client instance
const client = new Paho.MQTT.Client(signedUrl, clientID); // eslint-disable-line no-undef
// set callback handlers
client.onConnectionLost = onConnectionLost;
client.onMessageArrived = onMessageArrived;
// connect the client
client.connect({
keepAliveInterval: 15,
onSuccess: onConnect,
onFailure: onConnectionFailed,
});
return client;
}
主连接5分钟后,我尝试连接其他客户端时出错。我得到这个错误:AMQJS0007E套接字错误:{0}。
。我没有关于这个错误的更多信息
有人知道发生了什么或如何解决这个问题吗 您创建了多少个客户机?也许你达到了客户端限制?你有你连接的代理的日志吗?@hardillb谢谢你的帮助,但我不再使用该应用了。