Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 5分钟后出现MQTT错误_React Native_Mqtt_Iot - Fatal编程技术网

React native 5分钟后出现MQTT错误

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

我有一个React本机应用程序,需要与物联网(AWS)和WebSocket连接。我当前使用该软件包连接我的应用程序。这是我的密码:

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谢谢你的帮助,但我不再使用该应用了。