Changeset 5396:e2e5f307ef8b in roaraudio for libroar/vio_socket.c


Ignore:
Timestamp:
01/24/12 01:22:31 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

better support for ROAR_VIOF_NONBLOCK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_socket.c

    r5381 r5396  
    171171  } 
    172172 } else { 
     173  if ( def->o_flags & ROAR_VIOF_NONBLOCK ) { 
     174   if ( roar_socket_nonblock(fh, ROAR_SOCKET_NONBLOCK) == -1 ) { 
     175    close(fh); 
     176    return -1; 
     177   } 
     178  } 
     179 
    173180  if ( connect(fh, &(def->d.socket.sa.sa), len) == -1 ) { 
    174    close(fh); 
    175    return -1; 
     181   if ( errno != EINPROGRESS ) { 
     182    roar_err_from_errno(); 
     183    close(fh); 
     184    return -1; 
     185   } 
    176186  } 
    177187 } 
Note: See TracChangeset for help on using the changeset viewer.