|
@ -1197,11 +1197,19 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu |
|
|
free(retstr); |
|
|
free(retstr); |
|
|
} else printf("issue_hello NULL return\n"); |
|
|
} else printf("issue_hello NULL return\n"); |
|
|
lasthello = (uint32_t)time(NULL); |
|
|
lasthello = (uint32_t)time(NULL); |
|
|
if ( allgood == 0 ) |
|
|
if ( (rand() % 10000) == 0 || allgood == 0 ) |
|
|
{ |
|
|
{ |
|
|
printf("RPC port got stuck, close bindsocket\n"); |
|
|
printf("RPC port got stuck, close bindsocket\n"); |
|
|
LP_bindsock = -1; |
|
|
LP_bindsock = -1; |
|
|
closesocket(sock); |
|
|
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); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|