Browse Source

Test

etomic
jl777 7 years ago
parent
commit
93eef2d96c
  1. 10
      iguana/exchanges/LP_nativeDEX.c

10
iguana/exchanges/LP_nativeDEX.c

@ -1197,11 +1197,19 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
free(retstr);
} else printf("issue_hello NULL return\n");
lasthello = (uint32_t)time(NULL);
if ( allgood == 0 )
if ( (rand() % 10000) == 0 || allgood == 0 )
{
printf("RPC port got stuck, close bindsocket\n");
LP_bindsock = -1;
closesocket(sock);
LP_bindsock_reset++;
sleep(10);
printf("launch new rpcloop\n");
if ( OS_thread_create(malloc(sizeof(pthread_t)),NULL,(void *)stats_rpcloop,(void *)&myport) != 0 )
{
printf("error launching stats rpcloop for port.%u\n",myport);
exit(-1);
}
}
}
}

Loading…
Cancel
Save