Browse Source

Fix windows nonblack connect, thanks decker!

pass-iguana-arg
jl777 7 years ago
parent
commit
c563ba96a6
  1. 6
      iguana/exchanges/LP_socket.c

6
iguana/exchanges/LP_socket.c

@ -51,7 +51,11 @@ int32_t set_blocking_mode(int32_t sock,int32_t is_blocking) // from https://stac
int32_t komodo_connect(int32_t sock,struct sockaddr *saddr,socklen_t addrlen)
{
struct timeval tv; fd_set wfd,efd; int32_t res,so_error; socklen_t len;
fcntl(sock,F_SETFL,O_NONBLOCK);
#ifdef _WIN32
set_blocking_mode(sock, 0);
#else
fcntl(sock, F_SETFL, O_NONBLOCK);
#endif // _WIN32
res = connect(sock,saddr,addrlen);
if ( res == -1 )
{

Loading…
Cancel
Save