|
|
@ -303,7 +303,6 @@ int32_t LP_sock_check(char *typestr,void *ctx,char *myipaddr,int32_t pubsock,int |
|
|
|
|
|
|
|
int32_t LP_nanomsg_recvs(void *ctx) |
|
|
|
{ |
|
|
|
static double lastmilli; |
|
|
|
int32_t nonz = 0; char *origipaddr; struct LP_peerinfo *peer,*tmp; double milli; |
|
|
|
if ( (origipaddr= LP_myipaddr) == 0 ) |
|
|
|
origipaddr = "127.0.0.1"; |
|
|
@ -323,9 +322,8 @@ int32_t LP_nanomsg_recvs(void *ctx) |
|
|
|
//printf("check %s pubsock.%d\n",peer->ipaddr,peer->subsock);
|
|
|
|
milli = OS_milliseconds(); |
|
|
|
nonz += LP_sock_check("PULL",ctx,origipaddr,LP_mypubsock,peer->subsock,peer->ipaddr,1); |
|
|
|
if ( lastmilli > 0. && milli > lastmilli+100 ) |
|
|
|
fprintf(stderr,">>>>>>>>>>>>>>>>> BIG latency lag %.3f milliseconds: (%s)\n",milli-lastmilli,LP_lastcommand!=0?LP_lastcommand:""); |
|
|
|
lastmilli = milli; |
|
|
|
if ( OS_milliseconds()-milli > 100 ) |
|
|
|
fprintf(stderr,">>>>>>>>>>>>>>>>> BIG latency lag %.3f milliseconds: (%s)\n",OS_milliseconds()-milli,LP_lastcommand!=0?LP_lastcommand:""); |
|
|
|
} |
|
|
|
/*HASH_ITER(hh,LP_coins,coin,ctmp) // firstrefht,firstscanht,lastscanht
|
|
|
|
{ |
|
|
@ -338,9 +336,8 @@ int32_t LP_nanomsg_recvs(void *ctx) |
|
|
|
{ |
|
|
|
milli = OS_milliseconds(); |
|
|
|
nonz += LP_sock_check("SUB",ctx,origipaddr,-1,LP_mypullsock,"127.0.0.1",1); |
|
|
|
if ( lastmilli > 0. && milli > lastmilli+100 ) |
|
|
|
fprintf(stderr,">>>>>>>>>>>>>>>>> BIG latency lag %.3f milliseconds: (%s)\n",milli-lastmilli,LP_lastcommand!=0?LP_lastcommand:""); |
|
|
|
lastmilli = milli; |
|
|
|
if ( OS_milliseconds()-milli > 100 ) |
|
|
|
fprintf(stderr,">>>>>>>>>>>>>>>>> BIG latency lag %.3f milliseconds: (%s)\n",OS_milliseconds()-milli,LP_lastcommand!=0?LP_lastcommand:""); |
|
|
|
} |
|
|
|
//portable_mutex_unlock(&LP_nanorecvsmutex);
|
|
|
|
return(nonz); |
|
|
|