Commit fcef71a7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

adaptive: remove nonsensical extra send() call

If net_Write() returns a short count, send() is not going to help. It
means the connection was closed.
parent 9afe3151
......@@ -86,14 +86,7 @@ bool Socket::send(vlc_object_t *stream, const void *buf, size_t size)
if (size == 0)
return true;
ssize_t ret = net_Write(stream, netfd, NULL, buf, size);
if (ret <= 0)
return false;
if ( (size_t)ret < size )
send( stream, ((uint8_t*)buf) + ret, size - ret );
return true;
return net_Write(stream, netfd, NULL, buf, size) == (ssize_t)size;
}
TLSSocket::TLSSocket() : Socket()
......
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