From d3cb8131d12832898af31c4f2484ec1bd6bed0f4 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 20 Feb 2023 16:56:58 -0600 Subject: [PATCH] Revert "Send TCP FIN after completion of our RTSP request" Existing servers already know how to parse our messages without this, so we just risk breaking things with middleboxes that don't do half-closed connections properly. We'll handle this better with encrypted RTSP. This reverts commit 95e3e26d1297bdd9640ea491ef55ae371790794e. --- src/PlatformSockets.h | 2 -- src/RtspConnection.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/PlatformSockets.h b/src/PlatformSockets.h index 26f1ceb..97c5ad6 100644 --- a/src/PlatformSockets.h +++ b/src/PlatformSockets.h @@ -15,8 +15,6 @@ #define SetLastSocketError(x) WSASetLastError(x) #define LastSocketError() WSAGetLastError() -#define SHUT_RD SD_RECEIVE -#define SHUT_WR SD_SEND #define SHUT_RDWR SD_BOTH #ifdef EAGAIN diff --git a/src/RtspConnection.c b/src/RtspConnection.c index aadf2f3..65fca43 100644 --- a/src/RtspConnection.c +++ b/src/RtspConnection.c @@ -267,9 +267,6 @@ static bool transactRtspMessageTcp(PRTSP_MESSAGE request, PRTSP_MESSAGE response goto Exit; } - // Notify the server that we're finished sending the request with a FIN - shutdown(sock, SHUT_WR); - // Read the response until the server closes the connection offset = 0; responseBufferSize = 0;