]> git.sesse.net Git - vlc/commitdiff
stream_filter: dash: don't try to close invalid fd
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 18 Nov 2014 14:25:37 +0000 (15:25 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 18 Dec 2014 20:23:48 +0000 (21:23 +0100)
modules/stream_filter/dash/http/HTTPConnection.cpp

index cc157e45656d4558ac6558d07d9967fba1a62bf7..847ccf682fd59678b7ddab30918313fedae79dfc 100644 (file)
@@ -30,6 +30,7 @@
 using namespace dash::http;
 
 HTTPConnection::HTTPConnection  (stream_t *stream) :
+                httpSocket      (-1),
                 stream          (stream),
                 peekBufferLen   (0),
                 contentLength   (0)
@@ -166,7 +167,8 @@ bool            HTTPConnection::sendData        (const std::string& data)
 }
 void            HTTPConnection::closeSocket     ()
 {
-    net_Close(this->httpSocket);
+    if (httpSocket >= 0)
+        net_Close(httpSocket);
 }
 bool            HTTPConnection::setUrlRelative  (Chunk *chunk)
 {