Browse Source

Test

etomic
jl777 8 years ago
parent
commit
515b8a75ec
  1. 2
      iguana/exchanges/LP_commands.c
  2. 2
      iguana/exchanges/LP_nativeDEX.c

2
iguana/exchanges/LP_commands.c

@ -213,7 +213,7 @@ forwardhex(pubkey,hex)\n\
} }
else if ( strcmp(method,"keepalive") == 0 ) else if ( strcmp(method,"keepalive") == 0 )
{ {
printf("got keepalive lag.%d\n",(int32_t)time(NULL) - LP_deadman_switch); printf("got keepalive lag.%d switch.%u\n",(int32_t)time(NULL) - LP_deadman_switch,LP_deadman_switch);
LP_deadman_switch = (uint32_t)time(NULL); LP_deadman_switch = (uint32_t)time(NULL);
return(clonestr("{\"result\":\"success\"}")); return(clonestr("{\"result\":\"success\"}"));
} }

2
iguana/exchanges/LP_nativeDEX.c

@ -476,7 +476,7 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,double profit
//printf("check deadman %u vs %u\n",LP_deadman_switch,(uint32_t)time(NULL)); //printf("check deadman %u vs %u\n",LP_deadman_switch,(uint32_t)time(NULL));
if ( LP_deadman_switch < time(NULL)-PSOCK_KEEPALIVE ) if ( LP_deadman_switch < time(NULL)-PSOCK_KEEPALIVE )
{ {
printf("DEAD man's switch activated, register forwarding again\n"); printf("DEAD man's switch %u activated at %u lag.%d, register forwarding again\n",LP_deadman_switch,(uint32_t)time(NULL),(uint32_t)(time(NULL) - LP_deadman_switch));
if ( pullsock >= 0 ) if ( pullsock >= 0 )
nn_close(pullsock); nn_close(pullsock);
pullsock = LP_initpublicaddr(&mypullport,pushaddr,myipaddr,mypullport,0); pullsock = LP_initpublicaddr(&mypullport,pushaddr,myipaddr,mypullport,0);

Loading…
Cancel
Save