   {
     XON=false;
     firstConn = conns;
-    while(firstConn->isConnected())
+    while(firstConn != NULL)
     {
       firstConn->lastPacketLen = 0;
       firstConn = firstConn->next;


void ZCommand::reSendLastPacket(WiFiClientNode *conn)
{
  if(conn->lastPacketLen == 0) // never used, or empty
  {
    Serial.printf("[ %d %d %d ]",conn->id,conn->lastPacketLen,0);

    currentExpiresTimeMs = millis() + 1000;
  if(!crReceived)
    return;
  //delay(200); // give a pause after receiving command before responding
  // the delay doesn't affect xon/xoff because its the periodic transmitter that manages that.
  doSerialCommand();
}
