jl777 7 years ago
parent
commit
7fe4c5ca67
  1. 2
      iguana/exchanges/LP_network.c

2
iguana/exchanges/LP_network.c

@ -126,7 +126,6 @@ int32_t LP_peerindsock(int32_t *peerindp)
struct LP_peerinfo *peer,*tmp; int32_t peerind = 0; struct LP_peerinfo *peer,*tmp; int32_t peerind = 0;
HASH_ITER(hh,LP_peerinfos,peer,tmp) HASH_ITER(hh,LP_peerinfos,peer,tmp)
{ {
peerind++;
if ( peer->errors < LP_MAXPEER_ERRORS && peer->pushsock >= 0 ) if ( peer->errors < LP_MAXPEER_ERRORS && peer->pushsock >= 0 )
{ {
if ( peerind < *peerindp ) if ( peerind < *peerindp )
@ -135,6 +134,7 @@ int32_t LP_peerindsock(int32_t *peerindp)
//printf("peerind.%d -> sock %d\n",peerind,peer->pushsock); //printf("peerind.%d -> sock %d\n",peerind,peer->pushsock);
return(peer->pushsock); return(peer->pushsock);
} }
peerind++;
} }
return(-1); return(-1);
} }

Loading…
Cancel
Save