[xiph-commits] r2867 - liboggplay/trunk/src/liboggplay

tahn at svn.annodex.net tahn at svn.annodex.net
Wed Jun 6 21:07:16 PDT 2007


Author: tahn
Date: 2007-06-06 21:07:13 -0700 (Wed, 06 Jun 2007)
New Revision: 2867

Modified:
   liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
Log:
Slight fix to error handling for connect().


Modified: liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-07 02:07:21 UTC (rev 2866)
+++ liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-07 04:07:13 UTC (rev 2867)
@@ -228,7 +228,7 @@
    * connect to the host
    */
   while (connect(me->socket, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
-    if (errno == EINPROGRESS) {
+    if (errno == EINPROGRESS || errno == EALREADY) {
       if ((int)(curr_time_in_ms() - time_ref) > timeout_in_ms) {
         close_socket(me);
         return E_OGGPLAY_TIMEOUT;
@@ -238,7 +238,7 @@
     } else if (errno == EISCONN) {
       break;
     }
-    printf("Could not connect to host\n");
+    printf("Could not connect to host; error code is %d\n", errno);
     close_socket(me);
     return (errno == ETIMEDOUT) ? E_OGGPLAY_TIMEOUT : E_OGGPLAY_SOCKET_ERROR;
   }



More information about the commits mailing list