comparison libmpdemux/network.c @ 6476:a48a7315ed88

Increased the timeout value on connection.
author bertrand
date Fri, 21 Jun 2002 06:28:24 +0000
parents ebffa928a5d4
children 08712c93b643
comparison
equal deleted inserted replaced
6475:837ca6fd4adf 6476:a48a7315ed88
166 mp_msg(MSGT_NETWORK,MSGL_ERR,"Failed to connect to server\n"); 166 mp_msg(MSGT_NETWORK,MSGL_ERR,"Failed to connect to server\n");
167 close(socket_server_fd); 167 close(socket_server_fd);
168 return -1; 168 return -1;
169 } 169 }
170 } 170 }
171 tv.tv_sec = 0; 171 tv.tv_sec = 5;
172 tv.tv_usec = 500000; 172 tv.tv_usec = 0;
173 FD_ZERO( &set ); 173 FD_ZERO( &set );
174 FD_SET( socket_server_fd, &set ); 174 FD_SET( socket_server_fd, &set );
175 // When the connection will be made, we will have a writable fd 175 // When the connection will be made, we will have a writable fd
176 while((ret = select(socket_server_fd+1, NULL, &set, NULL, &tv)) == 0) { 176 while((ret = select(socket_server_fd+1, NULL, &set, NULL, &tv)) == 0) {
177 if( ret<0 ) mp_msg(MSGT_NETWORK,MSGL_ERR,"select failed\n"); 177 if( ret<0 ) mp_msg(MSGT_NETWORK,MSGL_ERR,"select failed\n");