<html><head></head><body>Hi,<br><br>This statistical approach oooks like it can lead to spurious failures, on all platforms. No way.<br><br>The bug must be somewhere else.<br><br><div class="gmail_quote">Le 15 janvier 2019 13:52:12 GMT+02:00, Xie Zhigang <zighouse@hotmail.com> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Fix the bug on Windows: if pausing the on-line VOD playing<br>for a long time (5 minutes or so), and the remote VOD server drops the<br>tcp connection, vlc_tls_Read() will be in an endless loop of retrial<br>with errno as EAGAIN. Use a max retrial count to recover vlc from the<br>endless reading loop.<hr> src/network/stream.c | 7 +++++++<br> 1 file changed, 7 insertions(+)<br><br>diff --git a/src/network/stream.c b/src/network/stream.c<br>index 6e015d5..7324f78 100644<br>--- a/src/network/stream.c<br>+++ b/src/network/stream.c<br>@@ -55,6 +55,7 @@ ssize_t vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)<br> {<br>     struct pollfd ufd;<br>     struct iovec iov;<br>+    int turn = 0;<br> <br>     ufd.events = POLLIN;<br>     ufd.fd = vlc_tls_GetPollFD(session, &ufd.events);<br>@@ -89,6 +90,12 @@ ssize_t vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)<br>         }<br> <br>         vlc_poll_i11e(&ufd, 1, -1);<br>+        /*<br>+         * Use an arbitrary max retrial count (10) to recover from endless loop<br>+         * on an invalid connection.<br>+         */<br>+        if (++turn > 10)<br>+            return rcvd ? (ssize_t)rcvd : -1;<br>     }<br> }<br> </pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>