Browse Source

test sendtimeout

release/v0.1
jl777 9 years ago
parent
commit
3b69c360ec
  1. 2
      iguana/iguana_init.c
  2. 1
      iguana/iguana_peers.c

2
iguana/iguana_init.c

@ -374,7 +374,7 @@ void iguana_parseline(struct supernet_info *myinfo,struct iguana_info *coin,int3
{
if ( iguana_bundleinitmap(myinfo,coin,bp,height,hash2,hash1) == 0 )
lastbundle = hash2, lastheight = height;
else if ( missing++ > coin->MAXBUNDLES )
else if ( missing++ > coin->MAXBUNDLES && strcmp("BTC",coin->symbol) == 0 )
{
printf("missing.%d\n",missing);
break;

1
iguana/iguana_peers.c

@ -392,6 +392,7 @@ int32_t iguana_socket(int32_t bindflag,char *hostname,uint16_t port)
timeout.tv_sec = 0;
timeout.tv_usec = 30000;
setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(void *)&timeout,sizeof(timeout));
setsockopt(sock,SOL_SOCKET,SO_SNDTIMEO,(void *)&timeout,sizeof(timeout));
}
opt = 0;
getsockopt(sock,SOL_SOCKET,SO_KEEPALIVE,(void *)&opt,&slen);

Loading…
Cancel
Save