diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index f2de86f8b..71bcba0ed 100755 --- a/iguana/iguana_peers.c +++ b/iguana/iguana_peers.c @@ -978,7 +978,11 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) } if ( coin->active != 0 && (fds.revents & POLLOUT) != 0 ) { - flag += iguana_pollQsPT(coin,addr); + if ( iguana_pollQsPT(coin,addr) > 0 ) + { + printf("pollQ!\n"); + flag++; + } if ( addr->dead != 0 ) { printf("%s is dead\n",addr->ipaddr); @@ -988,15 +992,15 @@ void iguana_dedicatedloop(struct iguana_info *coin,struct iguana_peer *addr) } if ( flag == 0 ) { - if ( run++ > 10000 ) + if ( run++ > 1000 ) { - //printf("sleep\n"); + printf("sleep\n"); sleep(1); } else if ( addr->rank != 1 ) usleep(coin->polltimeout*2500 + (rand() % (coin->polltimeout*2500))); else usleep(100 + coin->polltimeout*1000); - } + } //else printf("flag.%d\n",flag); } if ( flag != 0 ) run = 0; diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 281fe6e05..8e2468a30 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -713,6 +713,8 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr) return(1); } } + if ( (rand() % 100) < 50 ) + break; } } else