Fix 'Packet #1 came too late' warning after first connection.
Remove "press 'q' to continue" after device disconnection in TCP mode.
This commit is contained in:
Tindy X
2021-06-25 13:23:58 +08:00
parent e452064f0b
commit 1d7fc82e7c
+7 -5
View File
@@ -466,6 +466,7 @@ int main(int argc, char* argv[])
while(_getwch() != L'q');
//std::cout << "Exiting gracefully..." << std::endl;
printErr("[INFO] Exiting gracefully...\n");
last_input_packet_id = 0;
EXIT_FLAG = true;
LEDThread.join();
InputThread.join();
@@ -497,13 +498,14 @@ int main(int argc, char* argv[])
EXIT_FLAG = false;
auto LEDThread = std::thread(TCPLEDBroadcast, acc_socket, memory);
auto InputThread = std::thread(InputReceive, acc_socket, memory);
while(_getwch() != L'q');
//std::cout << "Exiting gracefully..." << std::endl;
printErr("[INFO] Exiting gracefully...\n");
EXIT_FLAG = true;
CONNECTED = false;
//while(_getwch() != L'q');
LEDThread.join();
InputThread.join();
//std::cout << "Exiting gracefully..." << std::endl;
printErr("[INFO] Exiting gracefully...\n");
last_input_packet_id = 0;
EXIT_FLAG = true;
CONNECTED = false;
}
}
return 0;