Commit 2632d19a authored by Francois Cartegnie's avatar Francois Cartegnie

stream_filter: dash: don't try to close invalid fd

parent 247df4e9
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment