MqttAsyncClient connect () infinite loop [message #1836764] |
Wed, 13 January 2021 13:14 |
Angelo Primavera Messages: 1 Registered: January 2021 |
Junior Member |
|
|
Hello,
I observed the conditon descrived below that, from my poit of view, seams to be a bug.
I started a "dummy" brocker using netcat.
# nc -l -m 100 -k 10.60.2.43 1883
Then I started a MQTT client based on Paho MqttClient lib (v. 1.2.5)
The client is abviuosly able to open a socket and send the CONNET message but the "dummy" brocker does not answer to the request.
In this situation, the behaviour expected should be a socket close after a defined timeout. Instead the client remain in a infinete loop in the receiver thread:
13:53:34,879 FINE [org.eclipse.paho.client.mqttv3.internal.CommsReceiver] (MQTT Rec: MYCLIENT) MYCLIENT: network read message
13:53:35,880 FINE [org.eclipse.paho.client.mqttv3.internal.CommsReceiver] (MQTT Rec: MYCLIENT) MYCLIENT: network read message
13:53:36,881 FINE [org.eclipse.paho.client.mqttv3.internal.CommsReceiver] (MQTT Rec: MYCLIENT) MYCLIENT: network read message
13:53:37,882 FINE [org.eclipse.paho.client.mqttv3.internal.CommsReceiver] (MQTT Rec: MYCLIENT) MYCLIENT: network read message
13:53:38,883 FINE [org.eclipse.paho.client.mqttv3.internal.CommsReceiver] (MQTT Rec: MYCLIENT) MYCLIENT: network read message
My impression is that the problem is linked to the next code lines in org.eclipse.paho.client.mqttv3.internal.CommsReceiver (from line 169):
else {
// fix for bug 719
if (!clientComms.isConnected() && !clientComms.isConnecting()) {
throw new IOException("Connection is lost.");
}
}
Any suggetion to resolve the problem?
Thank you.
Angelo
|
|
|
Powered by
FUDForum. Page generated in 0.03838 seconds