From f61ca0fc4f3865e9e3979f9c63d340201187d425 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 10 Jun 2018 07:26:09 -1100 Subject: [PATCH 1/2] Fix komodo_connect retail --- iguana/exchanges/LP_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index c5f976978..874d94971 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -90,7 +90,7 @@ int32_t komodo_connect(int32_t sock,struct sockaddr *saddr,socklen_t addrlen) } } set_blocking_mode(sock,1); - return(sock); + return(0); } int32_t LP_socket(int32_t bindflag,char *hostname,uint16_t port) From 88fec8dcd35ae59d47d7ae06ca17cd2eb0d38762 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 10 Jun 2018 07:27:14 -1100 Subject: [PATCH 2/2] Disable errno closing --- iguana/exchanges/LP_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index 874d94971..d7e7f03ce 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -200,7 +200,7 @@ int32_t LP_socket(int32_t bindflag,char *hostname,uint16_t port) timeout.tv_sec = 2; timeout.tv_usec = 0; setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout)); - if ( result != 0 ) + /*if ( result != 0 ) { if ( errno != ECONNRESET && errno != ENOTCONN && errno != ECONNREFUSED && errno != ETIMEDOUT && errno != EHOSTUNREACH ) { @@ -209,7 +209,7 @@ int32_t LP_socket(int32_t bindflag,char *hostname,uint16_t port) if ( sock >= 0 ) closesocket(sock); return(-1); - } + }*/ timeout.tv_sec = 10; timeout.tv_usec = 0; setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout));