From 92db58605eb2b138d9c9dc85974f7a9e3c72ae8b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 12 Jun 2018 05:06:40 -1100 Subject: [PATCH] Add back 10 second connect() --- iguana/exchanges/LP_socket.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 0b3e0bae3..e35947676 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -201,8 +201,8 @@ int32_t LP_socket(int32_t bindflag,char *hostname,uint16_t port) #endif if ( bindflag == 0 ) { -#ifdef _WIN32 - //if ( 1 ) // connect using async to allow timeout, then switch to sync +//#ifdef _WIN32 + if ( 1 ) // connect using async to allow timeout, then switch to sync { uint32_t starttime = (uint32_t)time(NULL); //printf("call connect sock.%d\n",sock); @@ -214,8 +214,8 @@ int32_t LP_socket(int32_t bindflag,char *hostname,uint16_t port) timeout.tv_usec = 0; setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout)); } -#else - //else +//#else + else { result = connect(sock,(struct sockaddr *)&saddr,addrlen); if ( result != 0 ) @@ -229,7 +229,7 @@ int32_t LP_socket(int32_t bindflag,char *hostname,uint16_t port) return(-1); } } -#endif +//#endif } else {