Ethernet not connected cause lost connection IoT Cloud

A delay is inevitable, but 2 seconds is quite good IMHO.

About the compilation errors, I believe that @ptillisch had a good answer on this.