]> git.sesse.net Git - vlc/commit
net_Read: rewrite, fix corner cases (fix #8972)
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 21 Jul 2013 16:37:06 +0000 (19:37 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 21 Jul 2013 16:41:53 +0000 (19:41 +0300)
commit3328b21b5b18721ff541cb326ff472a42d1bef4f
treeabb090e212620c85bf6c9fc2727631ed26027eec
parent013044c36169a4ef9974423a79432f2092281bf3
net_Read: rewrite, fix corner cases (fix #8972)

This new implementation opportunistically tries to read data before
invoking poll(). This reduces latency when data is already waiting in
buffers, allows receiving pending data in non-blocking fashion even if
the object has been killed. This also gives GnuTLS a chance to dequeue
data from internal buffers.

Also the corner case of 0 read should now be handled correctly.

The corner case of an error after success read is no longer handled.
This was race-prone and useless.
src/network/io.c