hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From a9bc13efdf4c6eb891a4c5e53bec3ace58e8f613 Mon Sep 17 00:00:00 2001
From: "jkand.huang" <jkand.huang@rock-chips.com>
Date: Wed, 17 Jun 2020 17:05:31 +0800
Subject: [PATCH] live555: fix close fd error.
 
Signed-off-by: jkand.huang <jkand.huang@rock-chips.com>
---
 liveMedia/RTSPServer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/liveMedia/RTSPServer.cpp b/liveMedia/RTSPServer.cpp
index 5b53812..af053c1 100644
--- a/liveMedia/RTSPServer.cpp
+++ b/liveMedia/RTSPServer.cpp
@@ -574,7 +574,7 @@ void RTSPServer::RTSPClientConnection::closeSocketsRTSP() {
   fOurRTSPServer.stopTCPStreamingOnSocket(fClientOutputSocket);
 
   // Turn off background handling on our input socket (and output socket, if different); then close it (or them):
-  if (fClientOutputSocket != fClientInputSocket) {
+  if (fClientOutputSocket != fClientInputSocket && fClientInputSocket != -1) {
     envir().taskScheduler().disableBackgroundHandling(fClientOutputSocket);
     ::closeSocket(fClientOutputSocket);
   }
-- 
2.26.1