Commit 874a4094 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: adaptive: close when read contentlength

parent e038068a
......@@ -173,7 +173,8 @@ ssize_t HTTPConnection::read(void *p_buffer, size_t len)
if(ret >= 0)
bytesRead += ret;
if(ret < 0 || (size_t)ret < len) /* set EOF */
if(ret < 0 || (size_t)ret < len || /* set EOF */
contentLength == bytesRead )
{
socket->disconnect();
return ret;
......
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