Browse code

Revert "Timeout TCP open() after 5 seconds."

This code is redundant and conflicts with lucas reimplementation of it.

This reverts commit a2f5e14a867768019b49b830e29801f1bfb2abb7.

Michael Niedermayer authored on 2011/05/30 09:36:49
Showing 1 changed files
... ...
@@ -97,7 +97,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
97 97
     }
98 98
 
99 99
     if (ret < 0) {
100
-        int timeout=50;
101 100
         struct pollfd p = {fd, POLLOUT, 0};
102 101
         ret = ff_neterrno();
103 102
         if (ret == AVERROR(EINTR)) {
... ...
@@ -120,12 +119,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
120 120
             ret = poll(&p, 1, 100);
121 121
             if (ret > 0)
122 122
                 break;
123
-            if(!--timeout){
124
-                av_log(NULL, AV_LOG_ERROR,
125
-                    "TCP open %s:%d timeout\n",
126
-                    hostname, port);
127
-                goto fail;
128
-            }
129 123
         }
130 124
         if (ret <= 0) {
131 125
             ret = AVERROR(ETIMEDOUT);