From 3b69c360ec729f4ec41f7c42a1453079e3426f4c Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 17 Sep 2016 08:21:57 -0300 Subject: [PATCH] test sendtimeout --- iguana/iguana_init.c | 2 +- iguana/iguana_peers.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/iguana/iguana_init.c b/iguana/iguana_init.c index 93809b8de..6212ec57a 100755 --- a/iguana/iguana_init.c +++ b/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; diff --git a/iguana/iguana_peers.c b/iguana/iguana_peers.c index 1c11b22a4..0664f64bb 100755 --- a/iguana/iguana_peers.c +++ b/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);