From 10638942f93ccf10d78185a164ea0be202618882 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 30 May 2017 14:05:01 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 725398a01..917322782 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -232,6 +232,7 @@ struct LP_peerinfo *LP_addpeer(int32_t amclient,struct LP_peerinfo *mypeer,int32 if ( pushport != 0 && subport != 0 && (pushsock= nn_socket(AF_SP,NN_PUSH)) >= 0 ) { timeout = 1000; + printf("pushsock.%d\n",pushsock); nn_setsockopt(pushsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout)); nanomsg_tcpname(pushaddr,peer->ipaddr,pushport); if ( nn_connect(peer->pushsock,pushaddr) >= 0 ) @@ -252,7 +253,12 @@ struct LP_peerinfo *LP_addpeer(int32_t amclient,struct LP_peerinfo *mypeer,int32 Client_connections += amclient; } else nn_close(subsock); } - } else nn_close(pushsock); + } + else + { + nn_close(pushsock); + printf("error connecting to push.(%s)\n",pushaddr); + } } else printf("%s pushport.%u subport.%u pushsock.%d\n",ipaddr,pushport,subport,pushsock); peer->profitmargin = profitmargin; peer->ipbits = ipbits;