From 4acaac35490d38316a6ba6f73054b9a6347bf89b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 4 Nov 2017 01:01:43 +0200 Subject: [PATCH] Test --- iguana/exchanges/stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/stats.c b/iguana/exchanges/stats.c index 2d93e296e..c58a6f0ca 100644 --- a/iguana/exchanges/stats.c +++ b/iguana/exchanges/stats.c @@ -763,8 +763,6 @@ void stats_rpcloop(void *args) bindsock = -1; continue; } - close(bindsock); - bindsock = iguana_socket(1,"0.0.0.0",port); memcpy(&ipbits,&cli_addr.sin_addr.s_addr,sizeof(ipbits)); arg64 = ((uint64_t)ipbits << 32) | (sock & 0xffffffff); arg64ptr = malloc(sizeof(arg64)); @@ -783,6 +781,8 @@ void stats_rpcloop(void *args) printf("error launching rpc handler on port %d\n",port); // yes, small leak per command } + close(bindsock); + bindsock = iguana_socket(1,"0.0.0.0",port); } }