Browse Source

Test

etomic
jl777 8 years ago
parent
commit
8cf858ab64
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_network.c

2
iguana/exchanges/LP_nativeDEX.c

@ -399,7 +399,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,double profit
nanomsg_tcpname(pushaddr,myipaddr,mypullport);
if ( (pullsock= nn_socket(AF_SP,NN_PULL)) >= 0 )
{
timeout = 10000;
timeout = 1;
nn_setsockopt(pullsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
#ifdef __APPLE__
nanomsg_tcpname(bindaddr,"*",mypullport);

2
iguana/exchanges/LP_network.c

@ -43,7 +43,7 @@ int32_t LP_send(int32_t sock,char *msg,int32_t freeflag)
//portable_mutex_lock(&LP_networkmutex);
if ( nn_poll(&pfd,1,1) > 0 )
{
if ( (sentbytes= nn_send(sock,msg,len,0)) != len )
if ( (sentbytes= nn_send(sock,msg,len,NN_DONTWAIT)) != len )
printf("LP_send sent %d instead of %d\n",sentbytes,len);
//else printf("SENT.(%s)\n",msg);
if ( freeflag != 0 )

Loading…
Cancel
Save