1909 |
1909 |
1910 /* |
1910 /* |
1911 * Note that we don't care if the command server is stopped, this one |
1911 * Note that we don't care if the command server is stopped, this one |
1912 * does almost certain keep running but tat doesn't harm. |
1912 * does almost certain keep running but tat doesn't harm. |
1913 */ |
1913 */ |
1914 while ((my_devices_state + my_panel_state + my_simulator_state) > 0) {}; |
1914 while ((my_devices_state + my_panel_state + my_simulator_state) > 0) { sleep(1); }; |
1915 mqtt_disconnect(); |
1915 mqtt_disconnect(); |
1916 |
1916 |
1917 stopLCD(); |
1917 stopLCD(); |
1918 if (sock != -1) { |
1918 if (sock != -1) { |
1919 if (shutdown(sock, SHUT_RDWR)) { |
1919 if (shutdown(sock, SHUT_RDWR)) { |