Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Problem Arduino YUN continuous duty

Hi Ian,


i have a update to Arduino YUN Reconnect problem.


The actual YUN implementation to connect to Server over TCP is:


void loop() {


  {client.connect(ip, port);}



I tested this lines. client.connected is always “false” when broken connection to broker and then reconnected the YUN.


The last commit in YunClient.cpp add a stop() for linux side


Your Implementation in MQTTClient.h

835 if (rc != SUCCESS)

836      isconnected = false;

837  return rc;


850 if (!isconnected)

851      goto exit;


905     if (len > 0)

906      rc = sendPacket(len, timer);            // send the disconnect packet

908    isconnected = false;

909    return rc;


Is the solution add the stop() in this line?



Back to the top