Join the input thread without interrupting first

Otherwise we'll kill it before it finishes draining
This commit is contained in:
Cameron Gutman committed 2021-05-15 22:56:44 -05:00
1 parent 431e188b07
commit ed9301f3f8
2 files changed
+2 -5

No files matched your search

+2 -4
View File
@@ -364,14 +364,12 @@ int stopInputStream(void) {
// Signal the input send thread to drain all pending
// input packets before shutting down.
LbqSignalQueueDrain(&packetQueue);
PltJoinThread(&inputSendThread);
PltCloseThread(&inputSendThread);
if (inputSock != INVALID_SOCKET) {
shutdownTcpSocket(inputSock);
}
PltInterruptThread(&inputSendThread);
PltJoinThread(&inputSendThread);
PltCloseThread(&inputSendThread);
if (inputSock != INVALID_SOCKET) {
closeSocket(inputSock);