|
|
@ -944,16 +944,22 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) |
|
|
|
{ |
|
|
|
flag += iguana_pollsendQ(coin,addr); |
|
|
|
if ( addr->dead != 0 ) |
|
|
|
{ |
|
|
|
printf("%s is dead\n",addr->ipaddr); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if ( flag == 0 ) |
|
|
|
{ |
|
|
|
if ( (fds.revents & POLLIN) != 0 ) |
|
|
|
{ |
|
|
|
flag += iguana_pollrecv(coin,addr,buf,bufsize); |
|
|
|
if ( addr->dead != 0 ) |
|
|
|
{ |
|
|
|
printf("%s is dead\n",addr->ipaddr); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if ( flag == 0 ) |
|
|
|
{ |
|
|
|
if ( time(NULL) > addr->pendtime+30 ) |
|
|
@ -968,9 +974,12 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) |
|
|
|
{ |
|
|
|
flag += iguana_pollQsPT(coin,addr); |
|
|
|
if ( addr->dead != 0 ) |
|
|
|
{ |
|
|
|
printf("%s is dead\n",addr->ipaddr); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if ( flag == 0 ) |
|
|
|
{ |
|
|
|
if ( run++ > 10000 ) |
|
|
|